Hi-
I am trying to write some code in an excel workbook that will open another excel workbook and go to the first blank line. I will then take some fields from the first workbook and insert them in appropriate columns in the second workbook.
I am running into trouble trying to have VBA go to the first blank line in the second workbook that was open using VBA.
Here is the code I have so far. The second workbook is opening but it is not making the first cell in the first blank row the active cell.
Thanks!
........
Private Sub CheckBox134_Click()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
'xlApp.ScreenUpdating = False
Set xlWB = xlApp.Workbooks.Open("file.xls")
'ActiveWorkbook.Close SaveChanges:=True
ActiveWorkbook.Activate
'Set oExcel = GetObject(, "Excel.Application")
'With x1WB.ActiveSheet
Sheets("file").Activate
Selection.End(xlDown).Select
End Sub
I am trying to write some code in an excel workbook that will open another excel workbook and go to the first blank line. I will then take some fields from the first workbook and insert them in appropriate columns in the second workbook.
I am running into trouble trying to have VBA go to the first blank line in the second workbook that was open using VBA.
Here is the code I have so far. The second workbook is opening but it is not making the first cell in the first blank row the active cell.
Thanks!
........
Private Sub CheckBox134_Click()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
'xlApp.ScreenUpdating = False
Set xlWB = xlApp.Workbooks.Open("file.xls")
'ActiveWorkbook.Close SaveChanges:=True
ActiveWorkbook.Activate
'Set oExcel = GetObject(, "Excel.Application")
'With x1WB.ActiveSheet
Sheets("file").Activate
Selection.End(xlDown).Select
End Sub