Results 1 to 3 of 3

Open file Location - variable location

Threaded View

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Question Open file Location - variable location

    I am trying to code a VBA button where it will open a folder in windows explorer.

    I can do it fine with the following code.

    Sub Key_Register()
    '
    '
    Dim Foldername As String
    Foldername = "L:\KEY REGISTER\40025\"
    
    Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
    '
    End Sub
    The issue is, the location varies depending on the job number.

    In the above case - it is Job 40025.

    This number changes from job to job - it will always be numerical but not always 5 digits (it can be 6-digits).

    I can put the job number in cell A1 where it will dynamically change.

    How do I integrate this to the above code?
    Last edited by heatwave; 01-29-2020 at 08:57 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mac excel 2016, vba copy file from one location to sandbox location
    By sujithy007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2016, 12:01 PM
  2. [SOLVED] Macro to Save Excel File to a SharePoint location and then e-mail that location in Outlook
    By NickyHavey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2016, 09:27 AM
  3. VBA Code to SaveAs file in one location, and backup to another location
    By honger in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2014, 10:57 PM
  4. [SOLVED] Specify export pdf file location is location workbook is saved.
    By dantray02 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2014, 01:13 PM
  5. [SOLVED] [Help]macro to open file browser, to select a location, and save the location to a cell
    By zhuleijia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2013, 09:56 AM
  6. Replies: 1
    Last Post: 10-31-2012, 11:19 AM
  7. help to open any .text file from any location
    By vivek_vermaiet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2011, 09:31 AM

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