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: 40
Default Having A Macro Run When A Selection Is Made

I have a combobox on a userform with a drop down list consisting of the 12
months. When I select a month I want the corresponding macro to run.
Example-After selecting January macro4 will run:
Sub Macro4()
ActiveSheet.Unprotect
Application.Goto Reference:="PAYMENTS!R1C16:R1C32"
ActiveSheet.Protect
End Sub

Private Sub cbomonth_Change()
If cbomonth.Value = "January" Then Macro4

I am having trouble in what to add above when I select February(Macro3)
Sub Macro3()
ActiveSheet.Unprotect
Application.Goto Reference:="PAYMENTS!R1C35:R1C51"
ActiveSheet.Protect
End Sub
which I want to bring me to
Application.Goto Reference:="PAYMENTS!R1C35:R1C51"

Thanks
 
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
Combo Box selection only shows bound column info after selection made. Coby Excel Programming 1 October 18th 07 02:04 AM
Combo box disappears after selection made Inquiringmind Excel Discussion (Misc queries) 0 February 13th 07 02:25 AM
How to recalculate a worksheet when a selection is made Philip J Smith Excel Programming 5 March 8th 06 01:05 PM
Having A Macro Run When A Selection Is Made In A List Box Compnerd Excel Programming 3 March 5th 05 09:03 PM
Macro to change list box input range based on selection made in another cell Sue[_6_] Excel Programming 3 October 7th 04 06:45 PM


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