PC Review


Reply
Thread Tools Rate Thread

Copy Macro and Forms/code

 
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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?

 
Reply With Quote
 
 
 
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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.

 
Reply With Quote
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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.

 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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.



 
Reply With Quote
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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.


 
Reply With Quote
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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.


 
Reply With Quote
 
anon1m0us
Guest
Posts: n/a
 
      19th Apr 2007
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 With Quote
 
Susan
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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 <anon1m...@yahoo.com> 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 -



 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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 <anon1m...@yahoo.com> 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 -



 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      19th Apr 2007
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 <anon1m...@yahoo.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy VBA code into a workbook created by a macro Planner Rob Microsoft Excel Programming 11 22nd Sep 2009 09:32 AM
Macro VBA code to copy content from one worksheet to another Xocial Microsoft Excel Programming 4 13th Jan 2008 10:56 PM
Save a copy of PPT without macro code included Vann Microsoft Powerpoint 4 30th Jun 2006 03:57 AM
Need a sample or VBA code to open a C# windows forms in Excel using Macro dotnetguys Microsoft Excel Programming 0 3rd Feb 2006 02:05 PM
Copy Code From a one excel to other through Macro =?Utf-8?B?UGF2YW4gS2lzaG9yZSBLLiBTLg==?= Microsoft Excel Programming 3 10th Aug 2004 08:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:25 AM.