Go Premium for a chance to win a PS4. Enter to Win

x

Visual Basic Classic

163K

Solutions

58K

Contributors

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

Share tech news, updates, or what's on your mind.

Sign up to Post

Old VB6 Program with old Access doesn't display data on the grids for Windows 10 on one computer.  Same program and Access Databases show data in the grids for all Windows 10 computers except for this one computer.

Any thoughts on what could be causing this?  Virus Software, Windows 10 Security, Corrupted Dll?

Thanks
0
New feature and membership benefit!
LVL 11
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Hello,

The attached sample has a code that breaks out information into separate workbooks based on changes in column C.  The problem I am dealing with is a sub c code exception that has been added which is missing some rows when its created and saved in a file.  For example, if the number in column c is 000060 and the manager is Washington, George, a new workbook is created named 000060A.

Based on the current code this works fine but when you open 000060A it is missing rows 1-13 that appear in the master.  The Sub c code at the bottom calls out the SR =14 which is set to the number of rows with first line after header but this is not sufficient as I mentioned earlier because its missing rows 1-13 from that master sheet.  If I change the SR to equal 1 (thinking that would grab everything), it bypasses the Sub c code.

So basically when you open 000060A the first 14 rows should look identical to opening workbooks 000030, 000002, etc. (see sample pic).  Please note that if you are going to test the existing code you'll need to provide a file path of where you want the new workbooks to be saved (Filepath = "S:\").

I've been stuck with this issue for a while and hoping some VB wizards can provide assistance.  Please provide a sample of the updated code in an attached workbook.  Thank you!
EE-Test-File.xlsm
EE-Sample-3.jpg
0
Hi,
lately I moved to OLAP based pivots as that seemed to avoid the nuisance of destroying pivots on input range/table data column name changes. Seemed to work well for page, row and column fields (what a relief!). For value fields (represented  internally by [Measures] cubefields however it seems to be more tricky. The [Measures] seems to get updated on the name change, e.g. from
[Measures].[Count of oldName] to [Measures].[Count of newName], but the Orientations gets set to xlHidden (not shown in the pivot). Any idea on how to fix/avoid that?

Looks like in some cases just setting the orientation back to xlDataField had no effect (without any error message), just readdding the Value field seems to work consistently. But as the xlHidden state for any such measures can have multiple reasons (not just the name change), it will be tricky to solve this issue programmatically with a catch all macro that acts on all xlHidden [Measures] cubefields.
0
Hello,

i want to install a printer, that i want to be named "INVOICE"

what i want : a user opens a file PDF and selects the printer named INVOICE.
The printer will print the current document 3 times (it is just one page) from a specific paper tray, in this case tray 3.

 i tried setting number of copies and paper tray setting in the basic "printing preferences" and "default printer settings" from the printer driver.  it  works for selecting paper tray, but the number of copies always get discarded.  

can this be achieved and how ?  may using a visual basic script ?
Settings-LPR-op-TCP-IP.jpg
0
Hi All,
I have come across an issue where we get a soap xml as a response to our request. This is parsed in our application (that was written in VB6). Sometimes the application throws an error
09/06/2017 13:36:04.889 INFO  Process Id #404 Thread Id #28 [process] 0404,16B0 - Error occurred while receiving EMF response: Server:XML Parser failed at linenumber 1, lineposition 8629, reason is: System error: -2146822873.
HRESULT=0x80004005: Unspecified error

09/06/2017 13:36:04.889 INFO  Process Id #404 Thread Id #28 [process] 0404,16B0 - Error occurred while receiving EMF response from Server: Subscript out of range

Looking at the error, I felt that the content was more than expected and so going out of range. But there are errors that are shown at line position 14000 or more!
I wanted to see by putting a log - what comes in that Soap when this issue happens. For standard logging I need to use string for my application.
Based on detailed log, I see the error happens while loading
Dim objReader As New SoapReader30
  
  objReader.Load Connector.OutputStream
    
  ParseEMFWSResponse objReader
    
  ReceiveEMFResponse = m_FileData

Open in new window


The Connector.OutputStream is of type IStream and I want to convert it to string and put in log file only when the issue happens.
I need help in converting from IStream to string in VB6.
I could not get much useful material on searching google. Please help.
0
This is a two part question. I'm using VS 2015 Enterprise with .NET 4.7 Projects are VB.NET
1. How do I setup my CR inside my VB.NET project so that the data .XML file resides in a environmental variable location?
    When I set my Datasource Location inside my application project (Using ADO.NET) it asks for a specific .XML location.
    I can put in "C:\SomeFolderName\data.xml" & it works, but I'd rather not clutter up Users Machine with a folder that may get deleted or altered. So my thinking is to put the file into [APPDATA] folder, but the project looks for the file upon entry.
2. How do I include, or automate the Crystal Reports redistributable inside my setup project?
    I can put the CR_64bit.msi & CR_32bit.msi on the disk & have the User install the correct one first, but I'd rather not leave the install up to possible omission or wrong one.
Thank you,
Russ
0
I have been researching various methods.One of interest, is to open the printer queue,sort and copy all files in a folder to the printer queue.This eliminates the looping.Can any one provide vba to accomplish this?

Thanks
0
I have following string in textbox now I want to fetch some of the data and put into another textbox.

like
Within this string -
"<TH class=displaytable_attribute scope=col>GC No.</TH>"
i want only GC No. in label1 and its value from  this line  is 15470038084 in text box 1
"<TD style="COLOR: #000000" class=displaytable_value><A style="BACKGROUND-COLOR: yellow">15470038084</A></TD>"
and same for the rest of the value like
for GC Date in label3 and its value in text box 3
<TH class=displaytable_attribute scope=col>GC Date</TH>
and value  is
<TD class=displaytable_value>23/10/2017</TD>

 and so on for the rest of the fields........

hope you understand what i want

plz assist me how to do that

thanks in advance


Data I have in the following format

<TD class=style1><BR><BR>&nbsp;<A href="Index.aspx"><IMG style="HEIGHT: 41px" src="images1/1ee.jpg"></A></TD>
<TD><BR><BR>&nbsp;&nbsp;&nbsp; </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="WIDTH: 750px; HEIGHT: 100px">&nbsp;<BR><A class=Heading_TrackingDetails name=tracking>Tracking Details </A><BR><BR>
<TABLE cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD class=cellborder_none colSpan=6 border="0"><B>Booking Details</B></TD></TR>
<TR>
<TH class=displaytable_attribute scope=col>GC No.</TH>
<TH class=displaytable_attribute scope=col>GC Date</TH>
<TH class=displaytable_attribute scope=col>GC Time</TH>
<TH …
0
When opening my VB6 program on a new Windows 7 computer, I receive errors upon opening my project file.  "Errors during load"  Then I look at the log file to see the errors.  Here are the errors:

Line 152: Class MSComctlLib.Toolbar of control Toolbar1 was not a loaded control class.
Line 159: The property name _ExtentX in Toolbar1 is invalid.
Line 160: The property name _ExtentY in Toolbar1 is invalid.
Line 161: The property name ButtonWidth in Toolbar1 is invalid.
Line 162: The property name ButtonHeight in Toolbar1 is invalid.
Line 164: The property name _Version in Toolbar1 is invalid.

How can I resolve this error and have the program open without issue?

Thanks in advance
0
Hello

Is there a way, in Excel 2016, to disable the multi-select and select all options in a pivot table filter?  I found the below post from a couple of years ago and I tried using the VBA syntax from this.

https://www.experts-exchange.com/questions/28528630/Disable-Multi-Select-and-Select-All-Options-in-Excel-2007-Pivot-Table.html

Private Sub Worksheet_Change(ByVal Target As Range)
    If PivotTables("GTMSIC").PivotFields("LOB").CurrentPage = "(All)" Then
        Application.Undo
        MsgBox "Select All-LOB instead", vbCritical + vbOKOnly, "Filter Selection" 'optional message
        PivotTables("GTMSic").PivotFields("LOB").EnableMultiplePageItems = False
    End If
End Sub

However, in my worksheet, the message box is put in an infinite loop. Every time I click ok or try to exit out, it pops up again.

Can anyone help me correct this.
0
Concerto Cloud for Software Providers & ISVs
LVL 5
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

I am trying to convert a legacy system written in VB6 to a Web Application

My biggest challenge is how to migrate with minimal conversion or com-plete  re-write options


Tools to consider should minimise learning curve for me

and should be either Free Downloadble tools

Whats tools options  exists on the market to move my VB6 app to a web app

Thanks

oluwole
0
Hi Everyone,

I'm using VB2008 connection with Ms Access.
Using Adodb connection.

Imports ADODB

Public Class Form1
    Public con As New ADODB.Connection

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.12.0;Data Source=" & My.Application.Info.DirectoryPath & "C:\Users\tkyasser.tkyahya\Desktop\Temporary\Wilma.mdb;Persist Security Info=False;Jet OLEDB:Database Password="
        con.Open()

        MsgBox("Connection Succeeded", vbInformation)

    End Sub
End Class


But it turn out to have an error say "Provider cannot be found. It may not be properly installed"
0
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
 txtLrNo = Text1.Text
    If URL = Website Then
              'on the page find the textbox name
        WebBrowser1.Document.All.Item("txtLrNo").Value = txtLrNo
              'also find the Track button name
        WebBrowser1.Document.All.Item("ImageButton1").Click
        
'        Text2.Text = WebBrowser1.Document.body.outerHTML

Else
    Exit Sub
    End If
 
End Sub

Open in new window

0
I had this question after viewing Run macro after mail is sent.
0
I have some applications written in VB6 that I need to run in XP mode in windows 10, but I can set the application's property to run in XP mode.  These are not games but business applications
0
Is there a way to make sure that when I call the Excel and Workbook open commands inside my vb app that I can always make sure they open at the top most of all forms and not behind a form?
0

Visual Basic Classic

163K

Solutions

58K

Contributors

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.