Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Validation/Macros

in in Excel 2000 or later, right click on the sheet tab (of the sheet or
sheets where you want this behavior) and select view code.

in the module that results, in the upper left corner select worksheet from
the dropdown. In the upper right corner, select Change from the dropdown.

you will get a code declaration like

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

(make sure you use the Change rather than SelectionChange code
declaration).

Assume the cell with the validation is cell D9

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Address = "$D$9" then
Worksheets(Target.Value).Activate
End if
End Sub

This assumes the name in the cell matches the name of the sheet.

--
Regards,
Tom Ogilvy


"Jock" wrote in message
...
Hi...

Eek someone help me!

I have 12 sheets one for each month and on each a validation drop down

menu with the list ofm months. Has anyone got any code to help me so that
when I the cell is activayed by the validation value the sheet can change to
the correct month...

A beer in the mail to anyone who can help me out...I know its easy...but

not for a novice like me...

Jock...



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Validation/Macros

Thanks Tom...
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
Macros running with Validation Rules Chris Excel Worksheet Functions 2 March 9th 10 12:07 AM
Excel 2007-programming macros that apply to data validation Derek Megyesi New Users to Excel 1 January 31st 10 10:11 PM
Macros & Validation John Calder New Users to Excel 0 June 13th 06 02:48 AM
Data Validation & Macros Michael Link Excel Discussion (Misc queries) 2 March 9th 05 05:32 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


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