One Button To Execute Two Macros
Solved/Closed
azmiismail
azmiismail
- Posts
- 17
- Registration date
- Thursday March 3, 2011
- Status
- Member
- Last seen
- July 20, 2011
azmiismail
- Posts
- 17
- Registration date
- Thursday March 3, 2011
- Status
- Member
- Last seen
- July 20, 2011
Related:
- Assign multiple macros to one button
- Run multiple macros with one button - Best answers
- How to combine multiple macros into one button - Best answers
- Combine multiple macros into one ✓ - Forum - Excel
- Excel vba assign macro to button programmatically - How-To - Excel
- How to split one excel sheet into multiple files using macro ✓ - Forum - Excel
- How to insert multiple rows in Excel with a macro? - Guide
- Assign macro to cell - Guide
4 replies
venkat1926
Mar 3, 2011 at 04:34 AM
- Posts
- 1864
- Registration date
- Sunday June 14, 2009
- Status
- Contributor
- Last seen
- August 7, 2021
Mar 3, 2011 at 04:34 AM
are they macros or event codes depending upon the sheet name. are they macros in the same workbooks create anothermacro
sub fullmacsro
(name of first macro)
(name of second macro)
end usb
make a button and assign "fullmacro" to this button.
sub fullmacsro
(name of first macro)
(name of second macro)
end usb
make a button and assign "fullmacro" to this button.
azmiismail
Mar 3, 2011 at 06:14 PM
- Posts
- 17
- Registration date
- Thursday March 3, 2011
- Status
- Member
- Last seen
- July 20, 2011
Mar 3, 2011 at 06:14 PM
Got an error message.To be more specific below are the details,
Under the workbook named "TESTCOMBUTTON"
In Sheet1,the code is,
Sub ClrClls()
Range("B2:B4").ClearContents
End Sub
In Sheet2,the code is,
Sub ClrChks()
ActiveSheet.CheckBoxes.Value=False
End Sub
I would like to assign a button in sheet1 to execute both the code.
Thanks.
Under the workbook named "TESTCOMBUTTON"
In Sheet1,the code is,
Sub ClrClls()
Range("B2:B4").ClearContents
End Sub
In Sheet2,the code is,
Sub ClrChks()
ActiveSheet.CheckBoxes.Value=False
End Sub
I would like to assign a button in sheet1 to execute both the code.
Thanks.
venkat1926
Mar 3, 2011 at 08:12 PM
- Posts
- 1864
- Registration date
- Sunday June 14, 2009
- Status
- Contributor
- Last seen
- August 7, 2021
Mar 3, 2011 at 08:12 PM
there is no macro in one sheet and another macro in another sheet. the macros are in one module in vb editor
anyhow try this modification
whenever you talk about error message you musts tell at which statement the error message occurs(or the macro stops) and also the text of error message which will be helpful to try to solve the problem.
anyhow try this modification
Sub ClrClls() worksheets("sheet1").activate Range("B2:B4").ClearContents End Sub Sub ClrChks() worksheets("sheet2").activate ActiveSheet.CheckBoxes.Value=False End Sub
whenever you talk about error message you musts tell at which statement the error message occurs(or the macro stops) and also the text of error message which will be helpful to try to solve the problem.
azmiismail
Mar 3, 2011 at 11:06 PM
- Posts
- 17
- Registration date
- Thursday March 3, 2011
- Status
- Member
- Last seen
- July 20, 2011
Mar 3, 2011 at 11:06 PM
Solved,Thank you very much.