Sub DetectPossibleErrors()
'Read the following lines, try to understand, integrate it and run it 'Author: Andreas Weiss, [EMAIL PROTECTED] , [EMAIL PROTECTED] Dim
strMyWorksheetWithVBA As String
Dim strMyWorksheetWithData As String Dim strPathFile As String 'The following two lines shows two possible errors
'1. Don't change your windows settings 'Are you using the explorer view which shows the filename with extension or not? '2. What is with the path to these files? 'Please replace the values of these two strings with
' your file1.XLS and workbook1.xls strMyWorksheetWithVBA =
"C:\temp\sheet_vba.xls"
strMyWorksheetWithData = "C:\temp\sheet_data.xls" strPathFile = Dir(strMyWorksheetWithVBA) MsgBox "Where is my worksheet with VBA: " & strPathFile MsgBox "Compare your PathFile-entry: " & strMyWorksheetWithVBA & " with that what VBA founds: " & strPathFile strPathFile = Dir(strMyWorksheetWithData)
MsgBox "Where is my worksheet with DATA: " & strPathFile MsgBox "Compare your PathFile-entry: " & strMyWorksheetWithData & " with that what VBA founds: " & strPathFile End Sub
|