Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Malaysia
    Posts
    1

    Cool Unanswered: Excel to open automatically and paste the macro

    Hi,

    I actually have to send filter data in my MS Excel using Macro code. My question is that does excel have a special function to open it automatically and paste the macro code into the Visual Basic Editor?

    Appreciate the help in advance.

  2. #2
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Cool Re: Excel to open automatically and paste the macro

    All macros you might record in Excel are in the VBA code in a module. I find that the easiest way to run a routine like this is to record the macro, then call it from an event, something like this:

    Private Sub Workbook_Open()
    Call myMarco
    End Sub

    Where myMacro is the one I recorded and it is sitting in Module1
    You can do this also from the Sheet1_Active() function

    Good luck


    Originally posted by LiqNiq
    Hi,

    I actually have to send filter data in my MS Excel using Macro code. My question is that does excel have a special function to open it automatically and paste the macro code into the Visual Basic Editor?

    Appreciate the help in advance.

Posting Permissions

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