+ Reply to Thread
Results 1 to 2 of 2

Opening file depending on where the macro is run, either server or pc

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    1

    Opening file depending on where the macro is run, either server or pc

    We have an excel file on the server which has a macro that opens up other excel files and copies the data into the excel file.

    Users of the macro file run the macro either on the server by remote desktop or via accessing a particular folder on their PC through shared drive.

    Thus the path of the file needs to be dynamic based on where it is run from.

    For example

    If the file is opened from the PC then it should be
    Please Login or Register  to view this content.
    or else if the file is opened directly on the server then
    Please Login or Register  to view this content.
    Can anyone please help me understand on how this could be done in the VBA code itself
    Last edited by Leith Ross; 10-23-2013 at 09:34 PM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Opening file depending on where the macro is run, either server or pc

    Try

    Please Login or Register  to view this content.

+ 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. Opening SharePoint file with VBA - disable SharePoint "Contacting the server" message
    By kopite2002 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2013, 01:56 AM
  2. Using Macro to import Excel file to SQL server
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 05:49 PM
  3. Opening a file from ftp server without knowing the full file name
    By bysse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2010, 05:04 PM
  4. Opening files macro help (forcing directory, opening a tsv file)
    By NukedWhale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2010, 03:07 PM
  5. [SOLVED] Use a Macro to Upload Excel File to FTP Server when saving
    By Kris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2006, 12:50 PM

Tags for this Thread

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