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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Status
Not open for further replies.

Forum statistics

Threads
1,215,759
Messages
6,126,728
Members
449,332
Latest member
nokoloina

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