ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 843
- Office Version
- 365
- 2019
- Platform
- Windows
Have considerable amount of issues trying to get my VBA to even start. in quick summary was looking to:
1) A button to allow user a dialog box to select a .txt file (defaulting the folder path)
2) Clear contents of a tab in an existing workbook where the .txt file will be copied and paste it into
3) Formatting the data to remove any blanks rows between the data
I am not overly concerned with 2 & 3. #1 is where i am struggling. every time i use msoFileDialogFilePicker or msoFileDialogOpen it is giving me a compile error.
Dim intChoice As Integer
Application.FileDialog(msoFileDialogOpen).InitialFileName = "MY PATH"
intChoice = Application.FileDialog(msoFileDialogOpen).Show
If intChoice <> 0 Then
Call Application.FileDialog(msoFileDialogOpen).Filters.Add( _"Text Files Only", "*.txt")
End If
End Sub
1) A button to allow user a dialog box to select a .txt file (defaulting the folder path)
2) Clear contents of a tab in an existing workbook where the .txt file will be copied and paste it into
3) Formatting the data to remove any blanks rows between the data
I am not overly concerned with 2 & 3. #1 is where i am struggling. every time i use msoFileDialogFilePicker or msoFileDialogOpen it is giving me a compile error.
Dim intChoice As Integer
Application.FileDialog(msoFileDialogOpen).InitialFileName = "MY PATH"
intChoice = Application.FileDialog(msoFileDialogOpen).Show
If intChoice <> 0 Then
Call Application.FileDialog(msoFileDialogOpen).Filters.Add( _"Text Files Only", "*.txt")
End If
End Sub