Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default generating sheet with command button & code

Hey everybody,
I'm a little new to Excel soln dev so bear with me...
I have a master workbook with a button that generates
other workbooks. That works fine but now I have to include
a button (cmdGo) with corresponding code (cmdGo_Click()).
How do I do this in the code of the master workbook? Any
help, direction or example would be greatly appreciated.
Thanks a lot in advance!

Bob (please reply to group)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default generating sheet with command button & code

On Mon, 4 Aug 2003 01:44:26 -0700, Bob wrote:

Hey everybody,
I'm a little new to Excel soln dev so bear with me...
I have a master workbook with a button that generates
other workbooks. That works fine but now I have to include
a button (cmdGo) with corresponding code (cmdGo_Click()).
How do I do this in the code of the master workbook? Any
help, direction or example would be greatly appreciated.
Thanks a lot in advance!

Bob (please reply to group)


Did you define a procedure name? If so, try this:

**********
Private Sub cmdGo_Click()

Call MyProcedure

End Sub
**********

This will start the procedure 'MyProcedure', which should be included in
the workbook.

Good luck...

SL
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default generating sheet with command button & code

Thanks for the reply but I'm looking for something a bit
different. I'm sorry I didn't make myself clear. I need
to place a command button with corresponding code in the
GENERATED workbook (say, on Sheet2). I need to do this
from the code of the master workbook. Any ideas of how to
accomplish this?

-----Original Message-----
On Mon, 4 Aug 2003 01:44:26 -0700, Bob wrote:

Hey everybody,
I'm a little new to Excel soln dev so bear with me...
I have a master workbook with a button that generates
other workbooks. That works fine but now I have to

include
a button (cmdGo) with corresponding code (cmdGo_Click

()).
How do I do this in the code of the master workbook?

Any
help, direction or example would be greatly

appreciated.
Thanks a lot in advance!

Bob (please reply to group)


Did you define a procedure name? If so, try this:

**********
Private Sub cmdGo_Click()

Call MyProcedure

End Sub
**********

This will start the procedure 'MyProcedure', which should

be included in
the workbook.

Good luck...

SL
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default generating sheet with command button & code

Look at Chip Pearson's site for programming the VBE

http://www.cpearson.com/excel/vbe.htm

You can turn on the macro recorder and get the code for adding a button.

John Walkenbach also has sample code for creating controls on a userform
dynamically. It should still be useful for creating controls on a sheet
http://www.j-walk.com/ss/excel go to developer tips and then tips on
userforms.

Regards,
Tom Ogilvy



"Bob" wrote in message
...
Thanks for the reply but I'm looking for something a bit
different. I'm sorry I didn't make myself clear. I need
to place a command button with corresponding code in the
GENERATED workbook (say, on Sheet2). I need to do this
from the code of the master workbook. Any ideas of how to
accomplish this?

-----Original Message-----
On Mon, 4 Aug 2003 01:44:26 -0700, Bob wrote:

Hey everybody,
I'm a little new to Excel soln dev so bear with me...
I have a master workbook with a button that generates
other workbooks. That works fine but now I have to

include
a button (cmdGo) with corresponding code (cmdGo_Click

()).
How do I do this in the code of the master workbook?

Any
help, direction or example would be greatly

appreciated.
Thanks a lot in advance!

Bob (please reply to group)


Did you define a procedure name? If so, try this:

**********
Private Sub cmdGo_Click()

Call MyProcedure

End Sub
**********

This will start the procedure 'MyProcedure', which should

be included in
the workbook.

Good luck...

SL
.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default generating sheet with command button & code

Bob,

Why not create a template file (or sheet) with the controls alread embedded
and add the data to that, then save as a new file?

Alex@JPCS


"Tom Ogilvy" wrote in message
...
Look at Chip Pearson's site for programming the VBE

http://www.cpearson.com/excel/vbe.htm

You can turn on the macro recorder and get the code for adding a button.

John Walkenbach also has sample code for creating controls on a userform
dynamically. It should still be useful for creating controls on a sheet
http://www.j-walk.com/ss/excel go to developer tips and then tips on
userforms.

Regards,
Tom Ogilvy



"Bob" wrote in message
...
Thanks for the reply but I'm looking for something a bit
different. I'm sorry I didn't make myself clear. I need
to place a command button with corresponding code in the
GENERATED workbook (say, on Sheet2). I need to do this
from the code of the master workbook. Any ideas of how to
accomplish this?

-----Original Message-----
On Mon, 4 Aug 2003 01:44:26 -0700, Bob wrote:

Hey everybody,
I'm a little new to Excel soln dev so bear with me...
I have a master workbook with a button that generates
other workbooks. That works fine but now I have to

include
a button (cmdGo) with corresponding code (cmdGo_Click

()).
How do I do this in the code of the master workbook?

Any
help, direction or example would be greatly

appreciated.
Thanks a lot in advance!

Bob (please reply to group)

Did you define a procedure name? If so, try this:

**********
Private Sub cmdGo_Click()

Call MyProcedure

End Sub
**********

This will start the procedure 'MyProcedure', which should

be included in
the workbook.

Good luck...

SL
.





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
command button code dummy Excel Discussion (Misc queries) 2 December 1st 09 02:57 PM
Code for my Command Button to automatically copy and insert a new tommy Excel Discussion (Misc queries) 0 January 28th 09 12:22 AM
VBA code behind command button [email protected] Excel Worksheet Functions 1 March 22nd 06 08:13 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Create Command Button from Code Bruce B[_2_] Excel Programming 0 July 14th 03 02:01 PM


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