+ Reply to Thread
Results 1 to 3 of 3

Limiting execution of VBA macro to specific workstation in a shared spreadsheet

  1. #1
    Registered User
    Join Date
    07-02-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    2

    Limiting execution of VBA macro to specific workstation in a shared spreadsheet

    Hi, everybody! (No, I'm not Doctor Nick. )

    I was wondering if someone could help me modify the code of my VBA macro in order to limit execution to just one specific workstation in a shared spreadsheet. The problem is that everyone who has the spreadsheet open will attempt to run the VBA macro when the timer goes off.



    Here is the code for the timer to invoke the VBA macro "SaveDate":

    Please Login or Register  to view this content.



    Here is the actual code for the VBA macro "SaveDate" that is being invoked by the timer:

    Please Login or Register  to view this content.

    The goal is to have only the server (workstation name is TwerkingBuddha) be the one to execute the macro, thereby saving it locally without having the other users compete over saving it.

    Any help would be greatly appreciated. Thanks!


    Regards,
    Doctor Lemon

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Limiting execution of VBA macro to specific workstation in a shared spreadsheet

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    07-02-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Limiting execution of VBA macro to specific workstation in a shared spreadsheet

    Thank you, sir. That worked exactly as I intended for it to.

    The only modification that I had to make was putting the computername (i.e. TWERKINGBUDDHA instead of TwerkingBuddha) value in all capital letters.

    Repped!
    Last edited by DoctorLemon; 07-02-2014 at 06:29 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Code execution prohibited by shared function
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2014, 06:24 AM
  2. Macro to open from specific worksheet each time for shared users.
    By danlRB80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 04:19 AM
  3. [SOLVED] Shared file locks for saving when a specific macro is run
    By Sleepyshy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2013, 04:37 PM
  4. Need Macro that saves a second copy of an Excel spreadsheet to a shared network drive
    By rockhunter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-27-2011, 01:42 PM
  5. limiting the spreadsheet
    By oknir in forum Excel General
    Replies: 1
    Last Post: 02-22-2009, 02:51 PM

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