I’ve been looking for the answer to this problem for around 2 hours while working on other code. It seems like my answer should be listed in the MSDN because of its simplicity but I cant find it anywhere.
And my problem is thus: I have this VB6 program that opens up and messes with some values in an excel spreadsheet and when its done has to go to the next Sheet in the workbook (Sheet2) and do it all over again….. But I don’t know how to change its focus to Sheet2 so it can access the cells in that sheet! >.<
Using this dummy connection code what would I add to it to get it to select and show Sheet2 in the workbook?
Thanks in advance, I know my question is kinda silly. ^^;
Option Explicit Private Sub Form_Load() Dim AppExcel As Excel.Application Dim wBook As Workbook Dim mySheet As Worksheet Set AppExcel = New Excel.Application AppExcel.Application.Visible = True AppExcel.Workbooks.Add 'Adds a new book. End Sub