F
Fan924
What would make this macro stop after "Selection.ClearContents" It is
random. It makes it to the end most of the time. Very unreliable.
excel97
Sub ModuleImport()
Dim FileNameWithPath As Variant
Dim FNum As Variant
Dim SeparatorSymbol As String
Dim RowNdx As Long
Dim ColNdx As Integer
Dim TempVal As Variant
Dim WholeLine As String
Dim Pos As Integer
Dim NextPos As Integer
Dim SaveColNdx As Integer
SeparatorSymbol = "!"
'On Error Resume Next
Sheets("DataModule").Select
SaveColNdx = 1
RowNdx = 3
'>>>>>>>>>>>>>>>>>>>> Get File Name <<<<<<<<<<<<<<<<<<<<
FileNameWithPath = Application.GetOpenFilename(FileFilter:="Module
Files (*.dme),*.dme")
If FileNameWithPath = False Then
Exit Sub
End If
'>>>>>>>>>>>>>>>>>>>> Clear old Data <<<<<<<<<<<<<<<<<<<<
Range("A3:N300").Select
Selection.ClearContents
Selection.NumberFormat = "@"
Range("A1").Select
msgbox "Made It"
end sub
random. It makes it to the end most of the time. Very unreliable.
excel97
Sub ModuleImport()
Dim FileNameWithPath As Variant
Dim FNum As Variant
Dim SeparatorSymbol As String
Dim RowNdx As Long
Dim ColNdx As Integer
Dim TempVal As Variant
Dim WholeLine As String
Dim Pos As Integer
Dim NextPos As Integer
Dim SaveColNdx As Integer
SeparatorSymbol = "!"
'On Error Resume Next
Sheets("DataModule").Select
SaveColNdx = 1
RowNdx = 3
'>>>>>>>>>>>>>>>>>>>> Get File Name <<<<<<<<<<<<<<<<<<<<
FileNameWithPath = Application.GetOpenFilename(FileFilter:="Module
Files (*.dme),*.dme")
If FileNameWithPath = False Then
Exit Sub
End If
'>>>>>>>>>>>>>>>>>>>> Clear old Data <<<<<<<<<<<<<<<<<<<<
Range("A3:N300").Select
Selection.ClearContents
Selection.NumberFormat = "@"
Range("A1").Select
msgbox "Made It"
end sub