+ Reply to Thread
Results 1 to 2 of 2

Run macro on Shared Workbook

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    95

    Run macro on Shared Workbook

    I have this code and I was able to properly execute it but the problem is I couldnt seem to get it to work when I enable the shared workbook. The file that I am working on is going multiple users. Is this possible?

    Application.ScreenUpdating = False
    Sheets("Dumpsheet").Visible = True
    Sheet2.Unprotect Password:="abc"

    Range("N4").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("Dumpsheet").Select
    Cells(Application.Rows.Count, 1).End(xlUp).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=True
    Range("A3").Select
    Sheets("Tracker").Select
    Range("E2").Select
    Application.Goto Reference:="DeleteData"
    Selection.SpecialCells(xlCellTypeConstants, 23).Select
    Application.CutCopyMode = False
    Selection.ClearContents
    Range("A1:B1").Select
    Range("B1").Activate

    Sheets("Dumpsheet").Visible = False
    Application.ScreenUpdating = True
    Sheet2.Protect Password:="abc"

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Run macro on Shared Workbook

    Hi,

    When you have VBA code it goes along with the workbook it is stored in. When you ask if your VBA can work on a "shared workbook", I don't know if you own that workbook and it is running on your machine.

    Is the Shared Workbook on OneDrive and being shared using the cloud? If that is true then VBA only works on the Excel file on your machine. The OneDrive Cloud view of the Excel workbook is really in your browser and only has simple Excel formulas behind it. If you are trying to run your file VBA code on a shared workbook that lives on the cloud you will need to bring it down to your machine before the code will work on the workbook.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. issues with shared workbook how to pause macro and restart macro
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 11:01 AM
  2. Running Macro on Shared Workbook
    By ozridnijam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2012, 08:24 AM
  3. Macro on shared workbook
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-12-2010, 03:55 PM
  4. Macro does not run in a shared workbook
    By paraxis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2008, 06:03 AM
  5. Replies: 3
    Last Post: 01-02-2006, 07:35 PM
  6. Excel should allow macro on a shared workbook.
    By Sahin in forum Excel General
    Replies: 1
    Last Post: 06-30-2005, 09:05 AM
  7. Macro - Protection and shared workbook
    By gopher in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2005, 01:00 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