I am trying to a button that when pressed prompts the user to open a csv file and then a bunch of other things are automatically performed on the csv file. Here is code that I am currently working with:
Sub MainMacro()
Dim fNameAndPath As Variant
fNameAndPath = Application.GetOpenFilename(FileFilter:="Excel Files (*.csv), *.csv", Title:="Select File To Be Opened")
If fNameAndPath = False Then Exit Sub
Workbooks.Open Filename:=fNameAndPath
'Sheets.Add After:=Sheets(Sheets.Count)
'ActiveSheet.name = fNameAndPath
Call Macro1
Call Macro2
Call Macro3
Call Macro4
End Sub
Put this opens up the csv file and I want it to open in the tab and so the Marco1 Marco2...
can perform their respective tasks. So the button would perform all of MainMacro() on the newly active sheet which the user then loaded in.