• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vba to run module code using Check box & run botton

I have excel dashboard containing number of code for different modification. Now i try to create "User-Form" for control all module code. In this user-form when i check the "Check-box" and click Run button then its run the specific module and so on. If i select all "check-box" & click Run Button. then run all module one by one. I have design "User-Form" but i don't know how to create code for this. Here is picture of userform.
Please help me to solve this problem
 

Attachments

  • capture-20170131-220641.png
    capture-20170131-220641.png
    21.3 KB · Views: 11
Hi,
Thanks for asking the query here!!

I have checked your past few threads and noticed that you haven't responded the post after someone spended his own time to help you by suggesting him best.

Pls be noted that we are helping here as volunteer and enjoying the same too.
But it's only worth our efforts when it helped someone to get out the trouble.
Responding and liking are the best things to motivate us...

So pls always do that....
 
Hello FaizanRoshan88

Try this way!!! Please respond this so that we can help you further challenges..

Code:
Private Sub CheckBox1_Click() 'Browse file checkbox
Call Browsefile 'Macro name
End Sub
Private Sub CheckBox1_Click() 'Design file checkbox
Call Designfile 'Macro name
End Sub
Private Sub CheckBox1_Click() 'Create Invoice checkbox
Call CreateInvoice 'Macro name
End Sub
Private Sub CheckBox1_Click() 'Print Invoice checkbox
Call Printinvoce 'Macro name
End Sub


Sub Run_All_Macros()
Call Browsefile
Call Designfile
Call CreateInvoice
Call Printinvoce
End Sub

Private Sub OptionButton1_Click()
Call Run_All_Macros 'Calling all macros
End Sub
 
Thank for help, its work good but little bit problem. when i click on check box, code have run before click on run button.
i have find this way with help of this code
Code:
Sub run1_Click()
  If Me.BrowseFile.Value Then Application.Run "Dashboard.xlsm!BrowseData.BrowseData"
  If Me.DesignFilter.Value Then Application.Run "Dashboard.xlsm!Design.Design"
  If Me.CreateInvoice.Value Then Application.Run "Dashboard.xlsm!Filter_data.Filter_Data"
  If Me.PrintInvoice.Value Then Application.Run "Dashboard.xlsm!Printer"
End Sub
 
Back
Top