General information
Title:
Retrieving the text in an Excel textbox
This is not VB.net it is VB6, but I know there must be someone who can help me with this.
I have a worksheet with 10 textboxes. From VB6 I want to access the text typed into those boxes. I can access the objects but not the text.
For example this program opens the worksheet and prints the name of the controls. How would I change this to show the text?
Private Sub Command1_Click()
Dim xlApp As excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim i As Integer
Set xlApp = New excel.Application
Set wb = xlApp.Workbooks.Open("c:\applications\test.xls")
Set ws = wb.Worksheets.Item(1)
For i = 1 To ws.Shapes.Count
msgbox ws.Shapes(i).Name
Next
wb.Close
xlApp.Quit
Set ws = Nothing
Set wb = Nothing
Set xlApp = Nothing
End Sub
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only