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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Status
Not open for further replies.

Forum statistics

Threads
1,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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