Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

workbook troubles

  Asked By: Fujita    Date: Nov 05    Category: MS Office    Views: 573
  

I am working with an unknown number of workbooks. I need to know
how to name a certain one. I have just opened it, and now I need to
either name it or assign a variable to it so I can output data into
it. I added the new book using the .add method.
Eventually I want to name the book to something like "output" and be
able to reference that particular book without knowing the index number.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Lee Butler     Answered On: Nov 05

Workbooks are files. I suspect you are talking about worksheets.

When you do a Sheets.Add, the new sheet becomes the active sheet.

You can then name it

ActiveSheet.Name = "xxx"

and/or grab a reference  to it

Dim aa as WorkSheet
Set aa = ActiveSheet

Why didn't you post the code you have? And please use a more relevant
subject line for your messages.

 
Didn't find what you were looking for? Find more on workbook troubles Or get search suggestion and latest updates.




Tagged: