Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change focus of sheets from VB

Status
Not open for further replies.

butchkmd

Programmer
Nov 13, 2001
83
0
0
US
I need to populate some cells in Excel through VB
I origionaly use

Set sht = wb.Sheets("NameOfSheet")

then I poulate the cells I need

now I need to change to the next sheet in the workbook.

when I use.

Set sht = wb.Sheets("NextSheet'sName")
I don't get an error but my code doesn't populate tcells on the second worksheet.

any suggestions?

Thanks

M

 

If I remember correctly you need to do something like...

Sheet.Activate

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top