+ Reply to Thread
Results 1 to 3 of 3

If i open the excel the VBA will not run

  1. #1
    Registered User
    Join Date
    03-25-2015
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2013
    Posts
    43

    If i open the excel the VBA will not run

    Hello guys,

    I need a vba code that will prevent all of the vba from an excel document to run in case i open it.

    So in case i open the document the vba will not run but if another user opens it, it should run.

    Thanks,
    -Alex

  2. #2
    Registered User
    Join Date
    12-03-2015
    Location
    London, Ontario, Canada
    MS-Off Ver
    2007
    Posts
    2

    Re: If i open the excel the VBA will not run

    you can try adding this to the file you're trying to prevent running macros in
    if the file already has auto_open then put the line right at top of macro
    Sub Auto_Open
    if application.username="your user name" then end
    end sub

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: If i open the excel the VBA will not run

    Perhaps something like this:
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

+ 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. [SOLVED] Excel Hyperlink to open pdf- Error - "No program is registered to open this file
    By laxminarayana in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2016, 10:03 AM
  2. Replies: 1
    Last Post: 01-21-2008, 08:07 PM
  3. Replies: 1
    Last Post: 01-11-2006, 05:25 PM
  4. Replies: 1
    Last Post: 01-02-2006, 11:30 PM
  5. Replies: 0
    Last Post: 12-30-2005, 04:35 AM
  6. [SOLVED] Open email windows can't open, excel shreadsheet file .xls ?
    By skiz in forum Excel General
    Replies: 0
    Last Post: 10-02-2005, 03:05 PM
  7. Replies: 1
    Last Post: 07-12-2005, 09:06 AM

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