Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Run macro if user goes to a specific worksheet

I have a workbook with several worksheets. There is on worksheet that I want
to run a macro on if the user of the worksheet goes to it.

Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Run macro if user goes to a specific worksheet

Place the below as the first line of the macro.

If Environ("Username") < "username" Then Exit Sub

If this post helps click Yes
---------------
Jacob Skaria


"Danielle" wrote:

I have a workbook with several worksheets. There is on worksheet that I want
to run a macro on if the user of the worksheet goes to it.

Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Run macro if user goes to a specific worksheet

Oops....Use the Worksheet_Activate event...Right click sheet tabView code and

Private Sub Worksheet_Activate()

End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Place the below as the first line of the macro.

If Environ("Username") < "username" Then Exit Sub

If this post helps click Yes
---------------
Jacob Skaria


"Danielle" wrote:

I have a workbook with several worksheets. There is on worksheet that I want
to run a macro on if the user of the worksheet goes to it.

Any ideas?


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
How do I get a macro to be non worksheet specific? navel151 Excel Worksheet Functions 6 January 4th 10 09:46 PM
How to run specific macro on selected worksheet? Harshad[_2_] Excel Discussion (Misc queries) 2 October 31st 08 06:56 AM
User Specific excel problem when opening a excel worksheet SJMP Setting up and Configuration of Excel 3 January 16th 08 09:46 AM
Changing a macro from a specific worksheet to any worksheet MandrakeDM Excel Programming 4 November 3rd 07 01:31 PM
make a macro 'worksheet specific' Lori Excel Discussion (Misc queries) 11 October 29th 07 12:38 AM


All times are GMT +1. The time now is 06:05 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"