Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Worksheet is Active?
If I'm working in VBE and I need to know what the active Workbook is or which
Worksheet is active, how do I figure that out? Is there some tool that will tell me this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Worksheet is Active?
msgbox activeworkbook.name
msgbox activesheet.name (or, activeworkbook.activesheet.name) HTH, Keith "Bishop" wrote: If I'm working in VBE and I need to know what the active Workbook is or which Worksheet is active, how do I figure that out? Is there some tool that will tell me this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Worksheet is Active?
hi
Sub whatisit() Dim awbn As String Dim awsn As String awbn = ActiveWorkbook.Name awsn = ActiveSheet.Name MsgBox awbn MsgBox awsn End Sub regards FSt1 "Bishop" wrote: If I'm working in VBE and I need to know what the active Workbook is or which Worksheet is active, how do I figure that out? Is there some tool that will tell me this? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Worksheet is Active?
This is perfect. How do I add a shortcut key to this? Say I wanted to use
ctrl+q to run this? "FSt1" wrote: hi Sub whatisit() Dim awbn As String Dim awsn As String awbn = ActiveWorkbook.Name awsn = ActiveSheet.Name MsgBox awbn MsgBox awsn End Sub regards FSt1 "Bishop" wrote: If I'm working in VBE and I need to know what the active Workbook is or which Worksheet is active, how do I figure that out? Is there some tool that will tell me this? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Worksheet is Active?
hi
install the macro in a standard module then on the menu bar.... Toolsmacromacros highlight the macro then click the options button. add your shortcut then ok out. Regards FSt1 "Bishop" wrote: This is perfect. How do I add a shortcut key to this? Say I wanted to use ctrl+q to run this? "FSt1" wrote: hi Sub whatisit() Dim awbn As String Dim awsn As String awbn = ActiveWorkbook.Name awsn = ActiveSheet.Name MsgBox awbn MsgBox awsn End Sub regards FSt1 "Bishop" wrote: If I'm working in VBE and I need to know what the active Workbook is or which Worksheet is active, how do I figure that out? Is there some tool that will tell me this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Active Cell in Non-Active Worksheet | Excel Programming | |||
Copying the active worksheet to another worksheet in the same work | Excel Worksheet Functions | |||
Basic Question - How do I return the worksheet number of the active worksheet? | Excel Programming | |||
Altering code to reference the worksheet before the active worksheet | Excel Programming | |||
macro to apply worksheet event to active worksheet | Excel Programming |