Help getting a worksheet name from another Workbook

DChambers

Active Member
Joined
May 19, 2006
Messages
257
I have written a procedure that resides in 'thisworkbook' of a Reference Workbook that asks for a workbook name, the worksheet name and the column to be worked on. It then opens the book, replaces the abreviations in this column with the full name and saves it.

My problems is that I have to open each workbook, find the correct worksheet with the column - write this down and run the above procedure.

I know how to open a workbook, get a column, but cannot figure out how to navigate to the correct worksheet and get its name.

Any Ideas?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Not sure I follow -- do you mean loop all worksheets to test names, ie along the lines of:

Code:
Dim ws As Worksheet
For Each ws in ActiveWorkbook.Worksheets
   Select Case UCASE(ws.Name)
      Case "SHEET1"
      Case "SHEET2"
      Case Else
   End Select
Next ws

or to select a sheet if you have the name already ?

Code:
Sheets("Sheet1").Select
 
Upvote 0
I was thinking the procedure should do something like this:

Ask for, open and display on the screen the workbook (I can already do this part).

Using an Input box or some such user input do this:
Title: using your mouse find the sheet that has the abreviations then click 'OK'

This box would then stay on the screen until I find the right sheet and click 'OK' then it would get the active sheet name and pass it back as a string.
 
Upvote 0
Darrell

You really shouldn't rely on using ActiveSheet.

Is there anyway to determine the worksheet other than user input?
 
Upvote 0
Hi Norie,

Not that I can think of ...
If you are looking at the sheet on the screen isn't it the active sheet?
Couldn't I use activesheet.name?
If this is true perhaps there would be a way to cycle through the sheets?

BTW why not use activesheet?
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top