Hi,
I am new to the forum and to VBA.
I am creating an Excel sheet for my work, but i am stuck on this. I look over the internet for 2 days, including the forum and couldn't find. The closest i got was this thread : http://www.mrexcel.com/forum/excel-questions/428813-run-macro-after-dropdown-selection-made.html
My code works when i run it in the vba application.
Basically, what i want to do is to unhide/hide a row based on a cell value that will be chosen with data validation.
The code is:
What i want to do is to make this macro run all the time. Whenever the cell value is changed, that macro should run. Is that possible to have excel scanning it all the time and calling the macro without any other activation method?
Sorry if this was already answered somewhere, but i couldn't find.
Thanks for the help!
Felipe
I am new to the forum and to VBA.
I am creating an Excel sheet for my work, but i am stuck on this. I look over the internet for 2 days, including the forum and couldn't find. The closest i got was this thread : http://www.mrexcel.com/forum/excel-questions/428813-run-macro-after-dropdown-selection-made.html
My code works when i run it in the vba application.
Basically, what i want to do is to unhide/hide a row based on a cell value that will be chosen with data validation.
The code is:
Code:
Sub TheSelectCase1()
Select Case Range("E38").Value
Case "No"
Call Unhide_Sub
Case Else
Call Hide_Sub
End Select
End Sub
Sub Unhide_Sub()
Rows("38:40").Select
Selection.EntireRow.Hidden = False
End Sub
Sub Hide_Sub()
Rows("39").Select
Selection.EntireRow.Hidden = True
End Sub
What i want to do is to make this macro run all the time. Whenever the cell value is changed, that macro should run. Is that possible to have excel scanning it all the time and calling the macro without any other activation method?
Sorry if this was already answered somewhere, but i couldn't find.
Thanks for the help!
Felipe