LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Determining selected worksheet

I am using a common userform among several worksheets. Each sheet has
a macro button that will launce this userform dialog box. If
sheet(bob) is the one the user is using, I want the userform label
caption to read: "Bob's Page". If sheet(anne) is the one the user is
using, I want the userform label caption to read: "Anne's Page". If
sheet(christy) is the one the user is using, I want the userform label
caption to read: "Christy's Page".

Actually, these sheets are named for modules at the plant. The above
are only examples. We use these sheets to capture downtime from these
areas.

I have unsuccessfully tried this VB:

If ActiveSheet = "bob" Then
lbltitle.caption = "Bob's Page"
ElseIf ActiveSheet = "anne" Then
lbltitle.caption = "Anne's Page"
ElseIf ActiveSheet = "christy" Then
lbltitle.caption = "Christy's Page"
EndIf

'This didn't work, so I tried the following:

If Sheet = "bob" Then
lbltitle.caption = "Bob's Page"

If Sheet.visible = "bob" Then
lbltitle.caption = "Bob's Page"

'Neither of these worked either.

Thank you, Bob Conar
 
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
Determining if a chart is selected [email protected] Charts and Charting in Excel 2 January 25th 05 03:06 PM
Worksheet Selected Names Juraj[_2_] Excel Programming 2 October 27th 03 11:09 AM
Detecting Selected WorkSheet LeoNgan Excel Programming 8 October 8th 03 03:35 AM
Determining whether selected cell has value or formula? John Wirt Excel Programming 3 July 31st 03 04:19 AM
Determining if a worksheet exists within a workbook Cory Schneider Excel Programming 1 July 17th 03 12:36 AM


All times are GMT +1. The time now is 01:18 PM.

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

About Us

"It's about Microsoft Excel"