Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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
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
Active Cell in Non-Active Worksheet Jack Cannon Excel Programming 3 April 14th 09 05:12 PM
Copying the active worksheet to another worksheet in the same work queenmaam Excel Worksheet Functions 5 March 25th 08 06:56 PM
Basic Question - How do I return the worksheet number of the active worksheet? Regnab Excel Programming 2 May 17th 06 03:02 AM
Altering code to reference the worksheet before the active worksheet KimberlyC Excel Programming 8 March 15th 05 10:26 PM
macro to apply worksheet event to active worksheet Paul Simon[_2_] Excel Programming 3 August 7th 03 02:50 AM


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

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"