asked on
ASKER
Sub test()
sFileName1 = Application.GetOpenFilename
If sFileName1 = "False" Then
Exit Sub
End If
Set wb1 = Workbooks.Open(Filename:=sFileName1)
With wb1
countrows = 1
Do Until .Sheets(1).Cells(countrows, 1) = ""
countrows = countrows + 1
Loop
End With
wb1.Close
For i = 1 To countrows - 1
Sheets(1).Rows(1).Delete
Next
End Sub
ASKER
ASKER
ASKER
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
TRUSTED BY