Importing a userform to an new worksheet vba

Status
Not open for further replies.

toughie

New Member
Joined
Oct 10, 2018
Messages
35
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:

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,108,924
Messages
5,525,656
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top