+ Reply to Thread
Results 1 to 3 of 3

Using code to write code

  1. #1
    Registered User
    Join Date
    01-19-2006
    Posts
    35

    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

  2. #2
    NickHK
    Guest

    Re: Using code to write code

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

    NickHK

    "pspyve" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Registered User
    Join Date
    01-19-2006
    Posts
    35
    I just had a quick squiz at that site and it looks just perfect..... Many thanks

    Phil S

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1