D
dmbluv
Hello,
I'm new to using VBA in Excel. I'm hoping I'm missing something
simple and that someone here can help me.
I have one Excel workbook that has many subroutines/macros in Module
1. I have 5 worksheets in the workbook and each has navigation
buttons to move from sheet to sheet. On one sheet, there are required
fields that must be checked before a user can be moved to the desired
sheet. The buttons call the appropriate macro, like GoTo_Report,
which takes the user to the Report sheet. But, on the Project Info
screen, I need all these buttons to also run the macro that checks
against null values in the required fields. I have that code in
ProjInfoReqFields.
ProjInfoReqFields has 8 IF statements. I want each of these 5 buttons
to call ProjInfoReqFields, have it run through all 8 IF statements,
then call the second macro to go to the appropriate sheet. If I copy
this code in to each of the 5 navigation buttons, it works great. It
goes through all 8 IF statements, then I have the final Else statement
calling the second macro. But, when I try to just call both macros,
as shown below, it will only get through the first IF statement, then
it continues to the second macro.
Button2_Click()
'Macro to check against null values on Project Info sheet
ProjInfoReqFields
'Macro to move user from active sheet to Report sheet
GoTo_Report
End Sub
I made the following modification to the macro, which made it
successfully run through all 8 IF statements, but either wouldn't call
the second macro or something else is awry because it ends up going to
the wrong sheet.
Button2_Click()
'Macro to check against null values on Project Info sheet
ProjInfoReqFields
Exit Sub
'Macro to move user from active sheet to Report sheet
GoTo_Report
End Sub
I appreciate any help.
Thanks!
Tina
I'm new to using VBA in Excel. I'm hoping I'm missing something
simple and that someone here can help me.
I have one Excel workbook that has many subroutines/macros in Module
1. I have 5 worksheets in the workbook and each has navigation
buttons to move from sheet to sheet. On one sheet, there are required
fields that must be checked before a user can be moved to the desired
sheet. The buttons call the appropriate macro, like GoTo_Report,
which takes the user to the Report sheet. But, on the Project Info
screen, I need all these buttons to also run the macro that checks
against null values in the required fields. I have that code in
ProjInfoReqFields.
ProjInfoReqFields has 8 IF statements. I want each of these 5 buttons
to call ProjInfoReqFields, have it run through all 8 IF statements,
then call the second macro to go to the appropriate sheet. If I copy
this code in to each of the 5 navigation buttons, it works great. It
goes through all 8 IF statements, then I have the final Else statement
calling the second macro. But, when I try to just call both macros,
as shown below, it will only get through the first IF statement, then
it continues to the second macro.
Button2_Click()
'Macro to check against null values on Project Info sheet
ProjInfoReqFields
'Macro to move user from active sheet to Report sheet
GoTo_Report
End Sub
I made the following modification to the macro, which made it
successfully run through all 8 IF statements, but either wouldn't call
the second macro or something else is awry because it ends up going to
the wrong sheet.
Button2_Click()
'Macro to check against null values on Project Info sheet
ProjInfoReqFields
Exit Sub
'Macro to move user from active sheet to Report sheet
GoTo_Report
End Sub
I appreciate any help.
Thanks!
Tina