ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Import From with macro (https://www.excelbanter.com/excel-programming/338332-import-macro.html)

chad

Import From with macro
 
Is it possible to write a macro that will import an existing form?

Thanks for all your help!
-Chad

Jim Rech

Import From with macro
 
Import a userform from a file? Su

ActiveWorkbook.VBProject.VBComponents.Import "c:\UserForm1.frm"

--
Jim
"Chad" wrote in message
...
| Is it possible to write a macro that will import an existing form?
|
| Thanks for all your help!
| -Chad



FSt1

Import From with macro
 
hi,
if you are just import 1 form it might be better to do it manually.
open the file that has the form in it.
open the vb editor (alt + F11)
in the project window(far left), expand the project(filename) and right
click the form
click export. it will export as a .frm file.
you may wish to export to a floppy disk which can be transfer to other pc's
easily.
close the file
open the file you want the form in.
open the vb editor
in the project window, expand the project
right click the project name and click import
from the dialog box, select the form that you just exported and click ok
done

regards
FSt1

"Chad" wrote:

Is it possible to write a macro that will import an existing form?

Thanks for all your help!
-Chad


chad

Import From with macro
 
Thanks for the response. However, I am capable of doing it manually, but I
would like to do it within a macro. Is it possible to write this within a
macro?
Thanks,
Chad

"FSt1" wrote:

hi,
if you are just import 1 form it might be better to do it manually.
open the file that has the form in it.
open the vb editor (alt + F11)
in the project window(far left), expand the project(filename) and right
click the form
click export. it will export as a .frm file.
you may wish to export to a floppy disk which can be transfer to other pc's
easily.
close the file
open the file you want the form in.
open the vb editor
in the project window, expand the project
right click the project name and click import
from the dialog box, select the form that you just exported and click ok
done

regards
FSt1

"Chad" wrote:

Is it possible to write a macro that will import an existing form?

Thanks for all your help!
-Chad


chad

Import From with macro
 
That's perfect! Thank you very much!!!

-Chad

"Jim Rech" wrote:

Import a userform from a file? Su

ActiveWorkbook.VBProject.VBComponents.Import "c:\UserForm1.frm"

--
Jim
"Chad" wrote in message
...
| Is it possible to write a macro that will import an existing form?
|
| Thanks for all your help!
| -Chad





All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com