LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Open folder based on cell value

first I have set up folders with pictures that i need to bring into
the spreadsheet. to do this i want to open the correct folder. The
folder to open will be based on two things,

first the folder name based on the content of column B in the active
row.
second a folder within the first folder named as the date that is in
column C in the active row

ex: column B (in active row) might say something like 123456 and
column C (in active row) might have a date as 1/20/12. so the folder
to open would be 123456\01-20-12

The key thing here is column B and C are fixed whereas the row number
has to be the current active row

The entire folder string for example would be similar to the
following:-
C:\users\public\picture\123456\01-20-12

would anyone have a vba solution for this

currently i'm using the following code, but it's not dynamic.


strpath = "C:\Users\Public\Pictures\123456\01-20-12\"

strfile = Dir(strpath & "*.jpg")

Thanks to all
burl_h
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Should be simple: Lookup a picture from a folder based on a cell value changing Finny388 Excel Programming 8 April 19th 07 09:36 PM
User selection of folder and open all .xls files within folder Barb Reinhardt Excel Programming 4 April 14th 07 01:41 PM
Help: Can open a spreadsheet in a folder which contains spaces in the folder name! 1tsols Excel Programming 17 July 31st 06 04:26 PM
save to folder based on cell value Steve Excel Discussion (Misc queries) 1 June 15th 06 07:54 PM
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"