Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Is This Possible?

Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Is This Possible?

Yes, right click on "Module/ User Form/ Class Module" in project explorer tab
and click export then choose a file name.

Later you can also import.


*** please do rate ***




"Jason Zischke" wrote:

Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Is This Possible?

Hi Naveen

That is sort of what I am after but Importing thew code so that my file size
can be small but can still do every thing.

Jason

"Naveen" wrote:

Yes, right click on "Module/ User Form/ Class Module" in project explorer tab
and click export then choose a file name.

Later you can also import.


*** please do rate ***




"Jason Zischke" wrote:

Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Is This Possible?

Presumably the worksheets have controls and/or UDFs with the respective code
in modules etc.
If you remove these, you WS is obviously not going to function as required.
To me, code does not add that much to file size, if it is cleaned (get Rob's
http://www.oaltd.co.uk/DLCount/DLCou...odeCleaner.exe) .
It is more the data, formatting, graphics and other stuff that produce big
files.

If you have a lot of reusable code, put it in your Personal.xls or and
Add-in, so you do so you do not have to distribute it with every workbook.

NickHK

"Jason Zischke" wrote in message
...
Hi Naveen

That is sort of what I am after but Importing thew code so that my file

size
can be small but can still do every thing.

Jason

"Naveen" wrote:

Yes, right click on "Module/ User Form/ Class Module" in project

explorer tab
and click export then choose a file name.

Later you can also import.


*** please do rate ***




"Jason Zischke" wrote:

Hi all

I was plugged with this question and I need to know whether it is

possibly.
Can you Export out Userforms, Modules & Class Moudules then call them

back
into excel rather then having a large excel file with all of them

stored in
there?

Thanks in advance

Jason



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Is This Possible?

Hi Jason,
Sure it is possible that we can store the Vb Components like UserForm,
Class Module,
Module.
Try this :
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Sub TestImportForm()
ThisWorkbook.VBProject.VBComponents.Import "C:\Userform1.frm"
End Sub

Regards,

Halim

Jason Zischke menuliskan:
Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Is This Possible?

Hi Halim

Thanks for the responce that was what I was after but I'm having a bit of
trouble getting it to remove the form,module or class modules and I wondering
if you can give me a hand with that?

Jason

" wrote:

Hi Jason,
Sure it is possible that we can store the Vb Components like UserForm,
Class Module,
Module.
Try this :
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Sub TestImportForm()
ThisWorkbook.VBProject.VBComponents.Import "C:\Userform1.frm"
End Sub

Regards,

Halim

Jason Zischke menuliskan:
Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Is This Possible?

Hi Halim,

I tried the code below however when I go to save it says that there is a
virus that seem to be caused by the code and wont allow me to save. Any help
with this would be greatly appreicated.

Jason

" wrote:

Hi Jason,
Sure it is possible that we can store the Vb Components like UserForm,
Class Module,
Module.
Try this :
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Sub TestImportForm()
ThisWorkbook.VBProject.VBComponents.Import "C:\Userform1.frm"
End Sub

Regards,

Halim

Jason Zischke menuliskan:
Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Is This Possible?

hi Jason,
1. To Export module1 :
From :

Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Change to:
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Module1").Export "C:\Userform1.frm"
End Sub

Assume that Vb components name is all vb: module, userform, class
module
in a project of VB.
Just change VBComponents item or name or index you can choose by your
self!.


2. About virus caution, check you macro security first before running
it!
setup your macro security to low mode.

If you want to remove module1 after export, try this :
Sub TestRemoveModule1()
ThisWorkbook.VBProject.VBComponents.Remove _
ThisWorkbook.VBProject.VBComponents("Module1")
End Sub


Regards,

Halim



Jason Zischke menuliskan:
Hi Halim,

I tried the code below however when I go to save it says that there is a
virus that seem to be caused by the code and wont allow me to save. Any help
with this would be greatly appreicated.

Jason

" wrote:

Hi Jason,
Sure it is possible that we can store the Vb Components like UserForm,
Class Module,
Module.
Try this :
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Sub TestImportForm()
ThisWorkbook.VBProject.VBComponents.Import "C:\Userform1.frm"
End Sub

Regards,

Halim

Jason Zischke menuliskan:
Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Is This Possible?

Hi Halim

Thanks for the responce what I meant was that when for example the user was
finished with the userform that it would remove it form the VBProject and
also when I go to save my workbook that this code is in norton anti-virus
brings up an alert the there is a virus and will not let the workbook save
but when i did a check for viruses on my computer but it didn't find it so it
must be something to do with code.

Jason

" wrote:

hi Jason,
1. To Export module1 :
From :

Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Change to:
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Module1").Export "C:\Userform1.frm"
End Sub

Assume that Vb components name is all vb: module, userform, class
module
in a project of VB.
Just change VBComponents item or name or index you can choose by your
self!.


2. About virus caution, check you macro security first before running
it!
setup your macro security to low mode.

If you want to remove module1 after export, try this :
Sub TestRemoveModule1()
ThisWorkbook.VBProject.VBComponents.Remove _
ThisWorkbook.VBProject.VBComponents("Module1")
End Sub


Regards,

Halim



Jason Zischke menuliskan:
Hi Halim,

I tried the code below however when I go to save it says that there is a
virus that seem to be caused by the code and wont allow me to save. Any help
with this would be greatly appreicated.

Jason

" wrote:

Hi Jason,
Sure it is possible that we can store the Vb Components like UserForm,
Class Module,
Module.
Try this :
Sub TestExportForm()
ThisWorkbook.VBProject. _
VBComponents("Userform1").Export "C:\Userform1.frm"
End Sub

Sub TestImportForm()
ThisWorkbook.VBProject.VBComponents.Import "C:\Userform1.frm"
End Sub

Regards,

Halim

Jason Zischke menuliskan:
Hi all

I was plugged with this question and I need to know whether it is possibly.
Can you Export out Userforms, Modules & Class Moudules then call them back
into excel rather then having a large excel file with all of them stored in
there?

Thanks in advance

Jason




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"