+ Reply to Thread
Results 1 to 5 of 5

Trouble loading pictures

  1. #1
    Registered User
    Join Date
    03-12-2024
    Location
    Pakistan
    MS-Off Ver
    MS Office Porfessional Plus 2021
    Posts
    2

    Trouble loading pictures

    If I change directory or folder name picture does not load.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 03-15-2024 at 08:16 AM. Reason: Code tags added (AliGW); title updated - please review the forum guidelines

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Excel VBA

    I haven't tested your project, but it seems to me that this line should have a trailing backslash after "...Pictures", like this:
    Please Login or Register  to view this content.
    Difficult is not to know but to share what you know (Han Fei Tzu reworked)

  3. #3
    Registered User
    Join Date
    03-12-2024
    Location
    Pakistan
    MS-Off Ver
    MS Office Porfessional Plus 2021
    Posts
    2

    Re: Excel VBA

    Thanks for reply but my issue is other. When i change folder name or hard disk partition like D: to E: i have to write complete route. why should it take auto matically like App.path something else.

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Trouble loading pictures

    Do you mind explaining better your issue.
    Do you mean you'd want to browse your folders all the way to the new path ? and then assign the path to a variable in your macro ?

  5. #5
    Banned User!
    Join Date
    03-11-2024
    Location
    usa
    MS-Off Ver
    CURRENT
    Posts
    23

    Re: Trouble loading pictures

    Does your code correctly formulate the path to image files, including changes to the directory or folder name? Is the file path updated after changes?
    Instead of using absolute file paths, try using relative paths. They will automatically adapt to changes in the directory structure.
    If you change the directory or folder name manually, make sure you also update the corresponding code that loads the images to reflect the new file path.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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