Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have two drop downs: one selecting month, and the other a year. I would like it when one of these changes, it runs a macro. Sounds simple...but I could not get anything successfully done. Any help is much appreciated! -- pikapika13 ------------------------------------------------------------------------ pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892 View this thread: http://www.excelforum.com/showthread...hreadid=557898 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit: Application.EnableEvents = False If Target.Address = "$A$2" Then 'one of the DD cells 'do your stuff ElseIf Target.Address = "$A$5" Then 'other DD cells 'do other stuff End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "pikapika13" wrote in message ... I have two drop downs: one selecting month, and the other a year. I would like it when one of these changes, it runs a macro. Sounds simple...but I could not get anything successfully done. Any help is much appreciated! -- pikapika13 ------------------------------------------------------------------------ pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892 View this thread: http://www.excelforum.com/showthread...hreadid=557898 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I think this is a good start, but I'm still having some problems. I'm still new to VBA. In the address below, am I supposed to put in the linked cell? If so, it doesn't work. Choosing the month will change this cell's value, but the macro won't kick off. However, when I manually change it, it does. If I'm supposed to have the address be where the DD is located, I don't know how to place the DD in that cell; it seems to just float over it. "If Target.Address = "$A$7" Then 'one of the DD cells" -- pikapika13 ------------------------------------------------------------------------ pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892 View this thread: http://www.excelforum.com/showthread...hreadid=557898 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have assumed Data Validation, not a combobox?
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "pikapika13" wrote in message ... I think this is a good start, but I'm still having some problems. I'm still new to VBA. In the address below, am I supposed to put in the linked cell? If so, it doesn't work. Choosing the month will change this cell's value, but the macro won't kick off. However, when I manually change it, it does. If I'm supposed to have the address be where the DD is located, I don't know how to place the DD in that cell; it seems to just float over it. "If Target.Address = "$A$7" Then 'one of the DD cells" -- pikapika13 ------------------------------------------------------------------------ pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892 View this thread: http://www.excelforum.com/showthread...hreadid=557898 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Wow...I dont' even know the difference. If I right-click on the box an choose format control, the last tab "Control" is availabe to link it t a range, cells, and number of drop down lines. I wouldn't even kno how to create this from scatch. I copied this box from somewhere else -- pikapika1 ----------------------------------------------------------------------- pikapika13's Profile: http://www.excelforum.com/member.php...fo&userid=1089 View this thread: http://www.excelforum.com/showthread.php?threadid=55789 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I cannot see that tab on my Excel, neither with a forms button, a controls
toolbox button, so I don't know which you have. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "pikapika13" wrote in message ... Wow...I dont' even know the difference. If I right-click on the box and choose format control, the last tab "Control" is availabe to link it to a range, cells, and number of drop down lines. I wouldn't even know how to create this from scatch. I copied this box from somewhere else. -- pikapika13 ------------------------------------------------------------------------ pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892 View this thread: http://www.excelforum.com/showthread...hreadid=557898 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Quick VBA Worksheet Change Event or Selection Question: | Excel Worksheet Functions | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
Another change event question | Excel Programming | |||
Sheet change event and list validation question | Excel Programming | |||
change event question | Excel Programming |