Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
burl_h wrote on 1/28/2012 :
I just figured it out (how to chnage the date "month/day/year" to "month-day-year" the following works nicely Dim lRow As Long lRow = ActiveCell.Row Const sInitPath As String = "C:\Users\Public\Pictures\" '//main path 'Add subfolder[s] strpath = sInitPath & Cells(lRow, "B") & "\" & Format(Cells(lRow, "C").Value, "MM-DD-YY") & "\" strfile = Dir(strpath & "\*.jpg") Garry, thanks for all your help. Burl_h You're welcome! However, if you persist to add the trailing backslash on the path string then you should remove it from the start of the file extension string. I deliberately put it here because paths normally do not contain the trailing backslash. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Should be simple: Lookup a picture from a folder based on a cell value changing | Excel Programming | |||
User selection of folder and open all .xls files within folder | Excel Programming | |||
Help: Can open a spreadsheet in a folder which contains spaces in the folder name! | Excel Programming | |||
save to folder based on cell value | Excel Discussion (Misc queries) | |||
open file from folder save in new folder | Excel Programming |