Hello,
I am trying to use the Shell function and trying to make it dynamic by adding a string variable in the file path but I am having trouble doing so. Here is what I have so far:
The file path is entered in CELL 56 of worksheet Console. AUD_UTACC_L&N_IBTSS.bat is the name of the batch file I need to run. Please let me know if I can help with more information. Thanks in advance!
I am trying to use the Shell function and trying to make it dynamic by adding a string variable in the file path but I am having trouble doing so. Here is what I have so far:
VBA Code:
Dim last as String
Dim batchfolder as String
last = Missing_Files.Range("B" & Rows.count).End(xlUp).row
batchfolder = Console.Range("C56").Value
If Missing_Files.Range("B" & last).Value = "AUD_UTACC_L&N_IBTSS" Then
Shell ("batchfolder \ AUD_UTACC_L&N_IBTSS.bat")
End If
End Sub
The file path is entered in CELL 56 of worksheet Console. AUD_UTACC_L&N_IBTSS.bat is the name of the batch file I need to run. Please let me know if I can help with more information. Thanks in advance!