+ Reply to Thread
Results 1 to 3 of 3

Running a macro on opening a file

  1. #1
    Registered User
    Join Date
    02-08-2008
    Posts
    2

    Running a macro on opening a file

    Hello

    I have automated my pc (windows xp) to open using the schedule tasks function. Once open i am using the workbook open function in my personal.xls in VBA to open a file (code below):

    Please Login or Register  to view this content.
    How can i then run a specific macro that exists in that workbook

    Thanks in adavance for any help

    Nik
    Last edited by VBA Noob; 02-08-2008 at 01:06 PM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon nieironisio

    ...and welcome to the forum!!

    Quote Originally Posted by nieironisio
    How can i then run a specific macro that exists in that workbook
    Use code inside a Workbook_Open event like this :
    Please Login or Register  to view this content.
    in the ThisWorkbook module.

    You could either "Call" the macros by name, or just put the code you want to run inside the macro.

    HTH

    DominicB
    Last edited by dominicb; 02-08-2008 at 09:56 AM.
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    02-08-2008
    Posts
    2
    thanks

    i can't believe i posted such a stupid question, i looked at this all of yesterday and failed to realise the answer was in the question. lol.

    Thanks though

+ 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