Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using code to write code


Hi guys,
Can we use VBA to write VBA??
ie I am creating workbooks and placing buttons in them and saving them
on the company server.
I can get the buttons to exicute a macro that is contained in the
original document(xls file). but what I would like to do is actually
place the code for those buttons into the automattically created
workbook.
The reason for this is when someone else opens one of these workbooks
and press' any of the buttons Excel goes looking for the original file
with the macros in it and opens it to exicute the code for this
particular button.
So I would like to place the code for the buttons inside the workbook
that contains the buttons.

Maybe I am looking at this the wrong way, maybe there is another way??
Any ideas??

Phil S


--
pspyve
------------------------------------------------------------------------
pspyve's Profile: http://www.excelforum.com/member.php...o&userid=30656
View this thread: http://www.excelforum.com/showthread...hreadid=569737

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using code to write code

This should get you started:
http://www.cpearson.com/excel/vbe.htm

NickHK

"pspyve" wrote in
message ...

Hi guys,
Can we use VBA to write VBA??
ie I am creating workbooks and placing buttons in them and saving them
on the company server.
I can get the buttons to exicute a macro that is contained in the
original document(xls file). but what I would like to do is actually
place the code for those buttons into the automattically created
workbook.
The reason for this is when someone else opens one of these workbooks
and press' any of the buttons Excel goes looking for the original file
with the macros in it and opens it to exicute the code for this
particular button.
So I would like to place the code for the buttons inside the workbook
that contains the buttons.

Maybe I am looking at this the wrong way, maybe there is another way??
Any ideas??

Phil S


--
pspyve
------------------------------------------------------------------------
pspyve's Profile:

http://www.excelforum.com/member.php...o&userid=30656
View this thread: http://www.excelforum.com/showthread...hreadid=569737



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using code to write code


I just had a quick squiz at that site and it looks just perfect.....
Many thanks

Phil S


--
pspyve
------------------------------------------------------------------------
pspyve's Profile: http://www.excelforum.com/member.php...o&userid=30656
View this thread: http://www.excelforum.com/showthread...hreadid=569737

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
Write Code w/VBA Ronbo Excel Programming 2 May 23rd 06 08:54 PM
Code to write out all lines of code davidm Excel Programming 3 August 5th 05 04:26 AM
Write a code by code Excel Discussion (Misc queries) 1 March 23rd 05 02:34 PM
Write a code with another code JJ[_7_] Excel Programming 5 March 23rd 05 02:23 PM
How can i write TSR code A-Design Excel Programming 5 September 29th 04 05:26 PM


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