Importing a userform to an new worksheet vba

Status
Not open for further replies.

toughie

New Member
Joined
Oct 10, 2018
Messages
43
Code:
[FONT=Verdana]Set wb = Workbooks.Add
    ThisWorkbook.Activate
    ActiveSheet.Copy Before:=wb.Sheets(1)
    wb.Activate
    Workbooks("Copy of TEST2 - Copy.xlsm").Close
    [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Dim path As String
    Dim fileName As String
    path = "C:\Users\andy_\OneDrive\Desktop\VAMLog\"
    fileName = "SAVEPDF.frm"
    ThisWorkbook.VBProject.VBComponents.Import path & fileName[/FONT][/FONT]

Im trying to get the SAVEPDF.frm to import into the new worksheet but its not working, any ideas?

its not throwing up an error, stuck now with no clues

any help appreciated?
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Status
Not open for further replies.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,487
Messages
5,831,972
Members
430,099
Latest member
rdhoy

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
Top