Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Copy Excel Chart Sheet to PowePoint - Mod of Jon Peltier code | Charts and Charting in Excel | |||
Need a sample or VBA code to open a C# windows forms in Excel using Macro | Excel Programming | |||
Macro code to check & copy columns | Excel Programming | |||
Copy Code From a one excel to other through Macro | Excel Programming | |||
Copy cell contents into Macro code | Excel Programming |