Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Option Explicit Public Sub ImportFile() ' Get workbook... Dim ws As Worksheet Dim filter As String Dim targetWorkbook As Workbook, wb As Workbook Dim Ret As Variant Dim Caption As String Dim TargetRng As Range Dim MyLastRow As Integer Dim MyLastColumn As Integer Set targetWorkbook = Application.ActiveWorkbook ' get the customer workbook filter = "Excel files (*.xls),*.xls" Caption = "Please Select an input file " Ret = Application.GetOpenFilename(filter, , Caption) If Ret = False Then Exit Sub Set wb = Workbooks.Open(Ret) With wb.ActiveSheet 'find last used row in column A MyLastRow = Cells(Rows.Count, "A").End(xlUp).Row 'find last used column in row 1 MyLastColumn = Cells(1, Columns.Count).End(xlToLeft).Column Range("a2", .Cells(MyLastRow, MyLastColumn)).Select End With Set targetWorkbook = ActiveWorkbook 'Note for activating target workbook: Workbooks("Book1").Worksheets("Sheet1") With targetWorkbook.Worksheets("imported") MyLastRow = .Range("A" & Rows.Count).End(xlUp).Row .Range("A" & MyLastRow + 1).PasteSpecial Paste:=xlPasteValues End With End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.