raghuram.star
Board Regular
- Joined
- Sep 5, 2012
- Messages
- 102
Hi
I have a question for you,
I'm want to run a macro where, the macro will check for the inputs given in a sheet and execute the codes, say
In Cell - B1 = FileName.doc
In Cell - B2 = C:\Directory\Folder\
I'm wondering, Is there a way to that.
Thanks in advance...
I have a question for you,
I'm want to run a macro where, the macro will check for the inputs given in a sheet and execute the codes, say
In Cell - B1 = FileName.doc
In Cell - B2 = C:\Directory\Folder\
Code:
Sub Check_File ()
Dim FileName, FilePath, FileCheck as String
FileName = Sheet1.Range("B1").Value
FilePath = Sheet1.Range("B2").Value
If FilePath = "Found" then
If FileName = "Found" then
Msg Box "File Found in Given Path"
Execute Some Code
Else
MsgBox "File Not Found in Given Path"
End If
Else
MsgBox "Given File Path Not Found"
End If
End Sub
I'm wondering, Is there a way to that.
Thanks in advance...