VB Question

caulifllower

New Member
Joined
Mar 16, 2009
Messages
3
Hello, I just started learning vb in excel. I'm working on creating a userform for multipletasks buttons. However, I'm not sure exctly how to fix this. Currently this is how the code looks like. Please see below.

Basically all the buttons are located in sheet called Start under the file name !button. i want to click the classification button and it will copy the form from P:\Closing\Forms\Classification.xlsx into my a new sheet of the
!button file. And after when i rename the !button worksheet, i would still allow me to copy other from into the same file at a later time.

Private Sub Classification_Click()
Workbooks.Open Filename:="P:\Closing\Forms\Classification.xlsx"
Sheets("Classification").Select
Sheets("Classification").Copy Before:=Workbooks("!buttons.xlsm").Sheets(1)
Windows("Classification.xlsx").Activate
ActiveWindow.Close
End Sub
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,523
Messages
6,125,319
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top