+ Reply to Thread
Results 1 to 2 of 2

Trouble opening a folder whereas folder name is stored as a variable

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Trouble opening a folder whereas folder name is stored as a variable

    Hello ,

    So I have a procedure that automatically creates a folder (let's say the name is "Football") within another folder stored on my desktop named "Sports". When the name "Football" is created, this name is also propagated to the last open cell in row 3 on a worksheet (shData) in my workbook.

    Nowthen, I have written the following code to open the folder named "Football". As you can see, I created a variable called 'EventNameProper" and assigned the name "Football" to it. However, when I run the code the line beginning with "str_folder =" does not recognize the variable "Football". If I remove "\EventNameProper" from my str_Folder line and rerun the code, the folder "Sports" opens exactly as I expect. What am I missing here?

    Please Login or Register  to view this content.
    Last edited by Grilleman; 01-25-2020 at 01:47 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Trouble opening a folder whereas folder name is stored as a variable

    Perhaps try

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

+ 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] Trouble Updating a list of Files if a file no longer exists in the Folder/Sub Folder Dir.
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-26-2019, 02:03 AM
  2. Open folder macro opening wrong folder
    By jomili in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2018, 09:27 AM
  3. [SOLVED] Making a folder and Opening the folder
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2016, 08:20 AM
  4. [SOLVED] VBA Code to save to a folder within a folder within a folder all based on cell values.
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-24-2016, 04:24 PM
  5. [SOLVED] Specific folder when opening windows popup folder selection with msoFileDialogFolderPicker
    By trizzo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2015, 11:05 AM
  6. Opening a folder from a stored file path
    By bocaj315 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2013, 03:53 AM
  7. "Folder Select" Dialogue - Opening multiple files from selected folder
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2005, 10:05 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