I'm working on supporting a macro I wrote (in excel 2003) for another group. On all users computers (excel 2010) it works, except one. The macros (more than one) seem to stop execution without any errors.
For example, I have a command button that brings up application.GetOpenFilename, the user selects a file, and a For ... Next loop parses out the filename and path and puts them in separate cells.
I noticed that when he runs the macro, it populates the first cell, but not the 2nd. I added breaks in front of both lines. It paused after the first line, but when I try and go to the next, it doesn't pause on the next line. Its as though it completely quit the subroutine.
Another macro does a bunch of random stuff, opens the file that is referenced above, and is supposed to do a bunch more random stuff. It seems to quit right after the file opens.
Again, I set pause breaks before both of those lines. The RFI file opens, but it doesn't break on the next line, the macro just seems to stop.
Like I said, there are other users with excel 2010 using the exact same file. What could be going wrong here? Should I have IT reinstall Office on thier workstation?
Halp!
For example, I have a command button that brings up application.GetOpenFilename, the user selects a file, and a For ... Next loop parses out the filename and path and puts them in separate cells.
Rich (BB code):
strFilePath = Application.GetOpenFilename("Excel files (*.xls; *.xlsx),*.xls;*.xlsx") '("Excel files (*.xls, *.xlsx),*.xls;*.xlsx")
For i = Len(strFilePath) To 1 Step -1
Debug.Print Mid(strFilePath, i, 1)
If Mid(strFilePath, i, 1) = "\" Then
Sheets("user form").Range("locrfi").Value = Left(strFilePath, i)
Sheets("user form").Range("fnrfi").Value = Right(strFilePath, Len(strFilePath) - i)
Exit For
End If
Next i
I noticed that when he runs the macro, it populates the first cell, but not the 2nd. I added breaks in front of both lines. It paused after the first line, but when I try and go to the next, it doesn't pause on the next line. Its as though it completely quit the subroutine.
Another macro does a bunch of random stuff, opens the file that is referenced above, and is supposed to do a bunch more random stuff. It seems to quit right after the file opens.
Rich (BB code):
'Open RFI, verify all required fields are filled out
Workbooks.Open (RFI)
Set wkbRFI = ActiveWorkbook
Set wsRFI = wkbRFI.Worksheets("RFI")
Again, I set pause breaks before both of those lines. The RFI file opens, but it doesn't break on the next line, the macro just seems to stop.
Like I said, there are other users with excel 2010 using the exact same file. What could be going wrong here? Should I have IT reinstall Office on thier workstation?
Halp!