Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

Hi; I created a macro and userforms on an excel spreadsheet. I want to
copy everything (userforms, code, macros) to a new spreadhseet. How
can I do it?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

I want to move all the code and macro's (I do not need any data in the
cells copied) to a new spreadsheet that contains the good data. The
current spreadhseet is going to be deleted. This is a one time process.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBE http://www.cpearson.com/excel/vbe.htm
"

I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Copy Macro and Forms/code

all you have to do is:

1. open the workbook that contains all the macros & userforms.
2. open a new workbook
3. open the VBA editor - you will see BOTH workbooks there
4. select & drag each module & userform from the old workbook to the
new workbook (will copy).
5. highlight, copy, & paste any worksheet or workbook macros that
aren't in a module.

:)
susan


On Apr 19, 10:44 am, anon1m0us wrote:
Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBEhttp://www.cpearson.com/excel/vbe.htm
"

I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

I copied the forms and module over. But it still does not work. When i
click on cell A2, a form is supposed to pop up. It is not happening.
Susan wrote:
all you have to do is:

1. open the workbook that contains all the macros & userforms.
2. open a new workbook
3. open the VBA editor - you will see BOTH workbooks there
4. select & drag each module & userform from the old workbook to the
new workbook (will copy).
5. highlight, copy, & paste any worksheet or workbook macros that
aren't in a module.

:)
susan


On Apr 19, 10:44 am, anon1m0us wrote:
Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBEhttp://www.cpearson.com/excel/vbe.htm
"

I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

Maybe the Macro is not running?
anon1m0us wrote:
I copied the forms and module over. But it still does not work. When i
click on cell A2, a form is supposed to pop up. It is not happening.
Susan wrote:
all you have to do is:

1. open the workbook that contains all the macros & userforms.
2. open a new workbook
3. open the VBA editor - you will see BOTH workbooks there
4. select & drag each module & userform from the old workbook to the
new workbook (will copy).
5. highlight, copy, & paste any worksheet or workbook macros that
aren't in a module.

:)
susan


On Apr 19, 10:44 am, anon1m0us wrote:
Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBEhttp://www.cpearson.com/excel/vbe.htm
"

I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy Macro and Forms/code

Ok, I copied the good data in the Workbook that i need, instead of
taking the MAcro out. However, there seems to be an extra workbook
called Personel.xls which opens everytime I open the workbook. Any
idea why and where it comes from?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Copy Macro and Forms/code

perhaps the code from the OLD workbook referred to certain sheet names
that are different in the new workbook???

look for anything that says something like

..worksheet("xxxx")

and make sure the xx's are the names of your CURRENT workbook
worksheets.

hth
susan


On Apr 19, 11:32 am, anon1m0us wrote:
Maybe the Macro is not running?



anon1m0us wrote:
I copied the forms and module over. But it still does not work. When i
click on cell A2, a form is supposed to pop up. It is not happening.
Susan wrote:
all you have to do is:


1. open the workbook that contains all the macros & userforms.
2. open a new workbook
3. open the VBA editor - you will see BOTH workbooks there
4. select & drag each module & userform from the old workbook to the
new workbook (will copy).
5. highlight, copy, & paste any worksheet or workbook macros that
aren't in a module.


:)
susan


On Apr 19, 10:44 am, anon1m0us wrote:
Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBEhttp://www.cpearson.com/excel/vbe.htm
"


I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Copy Macro and Forms/code

also, if you're supposed to click on a certain cell, make sure the
WORKSHEET code behind the original worksheet was copied over to the
new worksheed (you'd have to do this manually - #5 in my original
directions). there must be a _selection or _change code behind that
worksheet that calls the userform.
susan


On Apr 19, 11:32 am, anon1m0us wrote:
Maybe the Macro is not running?



anon1m0us wrote:
I copied the forms and module over. But it still does not work. When i
click on cell A2, a form is supposed to pop up. It is not happening.
Susan wrote:
all you have to do is:


1. open the workbook that contains all the macros & userforms.
2. open a new workbook
3. open the VBA editor - you will see BOTH workbooks there
4. select & drag each module & userform from the old workbook to the
new workbook (will copy).
5. highlight, copy, & paste any worksheet or workbook macros that
aren't in a module.


:)
susan


On Apr 19, 10:44 am, anon1m0us wrote:
Oh, and please do not mentioned to "Try looking at Chip Pearson's page
on working with code in the VBEhttp://www.cpearson.com/excel/vbe.htm
"


I looked there and no clue what it is talking about. I need to copy
everything in the VBAProject. It can be manually.- Hide quoted text -


- Show quoted text -



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Copy Macro and Forms/code

the personal.xls is a hidden worksheet which contains any macros that
you want available to run on any worksheet. it's stored in book1.
you can see it in the vba editor. but those macros will always be
there, no matter what worksheet you open, so you shouldn't need to
copy any of them to the new workbook.

if you record a macro, it asks you if you want it to be stored in THAT
particular workbook (would only be able to be accessed when that
workbook is open) or if you want it stored in the PERSONAL workbook
(which would always be available).
:)
susan



On Apr 19, 12:03 pm, anon1m0us wrote:
Ok, I copied the good data in the Workbook that i need, instead of
taking the MAcro out. However, there seems to be an extra workbook
called Personel.xls which opens everytime I open the workbook. Any
idea why and where it comes from?



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Copy Excel Chart Sheet to PowePoint - Mod of Jon Peltier code Frank Hayes[_2_] Charts and Charting in Excel 6 January 22nd 08 12:26 AM
Need a sample or VBA code to open a C# windows forms in Excel using Macro dotnetguys Excel Programming 0 February 3rd 06 02:05 PM
Macro code to check & copy columns mercedes[_4_] Excel Programming 2 October 6th 05 01:52 AM
Copy Code From a one excel to other through Macro Pavan Kishore K. S.[_2_] Excel Programming 3 August 10th 04 08:27 AM
Copy cell contents into Macro code Bob Leonard Excel Programming 2 December 1st 03 07:29 PM


All times are GMT +1. The time now is 06:24 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"