GribbiN
05-24-2015, 03:01 PM
Hi, Forum looks great!
Hopefully someone can help with what is probably a very basic question
I inherited a workbook from a team member who no longer works with me and there are some codes that don't work on my setup.
When debugging it appears the directory used at creation differs from mine
This is my location
C:\Users\jgribbin\Desktop\Walmart ASDA\ScannedDocs
I can live without the store creation folder but i would like the check store files function to work and to search in the above directory
My knowledge is limited and until work gets me on the courses i'm pretty much a copy and paste coder. I can uplaod the orginal work book and/or my own tweaked version.
Thanks in advance for any tips or help received
John
13493
Sub createstorefolder()
Dim strFolder As String
MkDir Range("storefolder") & Range("nameofstore")
MsgBox ("Store Folder Created")
End Sub
Sub checkstorefiles()
Range("A16").Select
Do While ActiveCell.Value <> ""
DirFile = Range("storefolder") & Range("nameofstore") & "\" & ActiveCell.Value & ".pdf"
If Dir(DirFile) = "" Then
ActiveCell.Offset(0, 1).Value = "N"
Else
ActiveCell.Offset(0, 1).Value = "Y"
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Hopefully someone can help with what is probably a very basic question
I inherited a workbook from a team member who no longer works with me and there are some codes that don't work on my setup.
When debugging it appears the directory used at creation differs from mine
This is my location
C:\Users\jgribbin\Desktop\Walmart ASDA\ScannedDocs
I can live without the store creation folder but i would like the check store files function to work and to search in the above directory
My knowledge is limited and until work gets me on the courses i'm pretty much a copy and paste coder. I can uplaod the orginal work book and/or my own tweaked version.
Thanks in advance for any tips or help received
John
13493
Sub createstorefolder()
Dim strFolder As String
MkDir Range("storefolder") & Range("nameofstore")
MsgBox ("Store Folder Created")
End Sub
Sub checkstorefiles()
Range("A16").Select
Do While ActiveCell.Value <> ""
DirFile = Range("storefolder") & Range("nameofstore") & "\" & ActiveCell.Value & ".pdf"
If Dir(DirFile) = "" Then
ActiveCell.Offset(0, 1).Value = "N"
Else
ActiveCell.Offset(0, 1).Value = "Y"
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub