#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Macro Help

I have a dialog box that I am using to pull up a specific sheet in my
workbook. It has 2 option buttons, one for week 1 and one for week 2, then
it has a dropdown for the day of the week. I then use the concatenate
command to combine the day and the week in the ref cell.

My question is...
How do I get the sheet that the cell name is referenced to open when I click
the OK button?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Macro Help

For the active workbook

Worksheets("MySheet").Activate

Or, being workbook-specific

Workbooks("Book1.xls").Worksheets("MySheet").Activ ate

Bob

"justaguyfromky" wrote in message
...
I have a dialog box that I am using to pull up a specific sheet in my
workbook. It has 2 option buttons, one for week 1 and one for week 2,

then
it has a dropdown for the day of the week. I then use the concatenate
command to combine the day and the week in the ref cell.

My question is...
How do I get the sheet that the cell name is referenced to open when I

click
the OK button?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Macro Help

What I want it to do is...
Worksheets (A1).Activate
How can I get this to work

Thanks

"Bob Kilmer" wrote:

For the active workbook

Worksheets("MySheet").Activate

Or, being workbook-specific

Workbooks("Book1.xls").Worksheets("MySheet").Activ ate

Bob

"justaguyfromky" wrote in message
...
I have a dialog box that I am using to pull up a specific sheet in my
workbook. It has 2 option buttons, one for week 1 and one for week 2,

then
it has a dropdown for the day of the week. I then use the concatenate
command to combine the day and the week in the ref cell.

My question is...
How do I get the sheet that the cell name is referenced to open when I

click
the OK button?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Macro Help

Hi,
Say A1 (contraining the sheet name to activate) is in the active sheet:
Worksheets(Range("A1").Text).Activate
Else, say A1 is in 'Sheet1'
Worksheets(Worksheets("Sheet1").Range("A1").Text). Activate

Regards,
Sébastien

"justaguyfromky" wrote:

What I want it to do is...
Worksheets (A1).Activate
How can I get this to work

Thanks

"Bob Kilmer" wrote:

For the active workbook

Worksheets("MySheet").Activate

Or, being workbook-specific

Workbooks("Book1.xls").Worksheets("MySheet").Activ ate

Bob

"justaguyfromky" wrote in message
...
I have a dialog box that I am using to pull up a specific sheet in my
workbook. It has 2 option buttons, one for week 1 and one for week 2,

then
it has a dropdown for the day of the week. I then use the concatenate
command to combine the day and the week in the ref cell.

My question is...
How do I get the sheet that the cell name is referenced to open when I

click
the OK button?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Macro Help

Whoa! Sorry for my brain dead answer. Your question is perfectly clear. I
shouldn't sleep while I post, I guess.

"justaguyfromky" wrote in message
...
What I want it to do is...
Worksheets (A1).Activate
How can I get this to work

Thanks

"Bob Kilmer" wrote:

For the active workbook

Worksheets("MySheet").Activate

Or, being workbook-specific

Workbooks("Book1.xls").Worksheets("MySheet").Activ ate

Bob

"justaguyfromky" wrote in

message
...
I have a dialog box that I am using to pull up a specific sheet in my
workbook. It has 2 option buttons, one for week 1 and one for week 2,

then
it has a dropdown for the day of the week. I then use the concatenate
command to combine the day and the week in the ref cell.

My question is...
How do I get the sheet that the cell name is referenced to open when I

click
the OK button?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"