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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which sheet did I just add?

Status
Not open for further replies.

docjohn52

Programmer
Sep 28, 2002
114
US
I'm writing a project that moves column data for an account to a dedicated sheet. If the account is new, I create a sheet.

How do I scan for the next new sheet.

NewSheet=sheets.add doesn't work. (Error 438.)

Thanks guys,

Upside down in VBA help, and I'm sooooo embarrassed! :)

John




 
Never mind...

Adding a new sheet makes it active...

John

(have a nice night...)

 
Add method returns object, so:
Code:
[b]Set[/b] NewSheet=sheets.add
There are optional parameters: Before, After, Count and Type, that allow to precise what and where sheets are inserted without any relation to active sheet.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top