ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find next blank row in another spreadsheet (https://www.excelbanter.com/excel-worksheet-functions/103150-find-next-blank-row-another-spreadsheet.html)

Bry

Find next blank row in another spreadsheet
 
Hi, my first time asking questions so please be gentle.

Im trying to use a recorded macro to do the following

copy a preset range of cells from worksheet 1 (INPUT FORM)
open a 2nd worksheet (QRY LOG)

find the next blank row - this is where im stumped!

paste the information
save the 2nd worksheet and close it

ive spent 40 mins searching various similar questions but cant find the
answer - probably due to my very limited understanding of vb - whenever i try
and pinch code its just not working.

could someone please edit the macro below to do what i require and if
possible explain how it works as it would be nice to understand it as well as
use it.

many thanks
Bry


Sub test1()
'
' test1 Macro
' Macro recorded 04/08/2006 by Bry
'

'
Range("A1:I1").Select
Selection.Copy
Workbooks.Open Filename:="C:\bry\NEW QRY LOG TESTING\QRY LOG.xls"
Range("A10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub


Toppers

Find next blank row in another spreadsheet
 
TRY:

Sub test1()
'
' test1 Macro
' Macro recorded 04/08/2006 by Bry'

Range("A1:I1").Select
Selection.Copy
Workbooks.Open Filename:="C:\bry\NEW QRY LOG TESTING\QRY LOG.xls"
With ActiveSheet
nextrow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
Range("A" & nextrow).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End With
'
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub

"Bry" wrote:

Hi, my first time asking questions so please be gentle.

Im trying to use a recorded macro to do the following

copy a preset range of cells from worksheet 1 (INPUT FORM)
open a 2nd worksheet (QRY LOG)

find the next blank row - this is where im stumped!

paste the information
save the 2nd worksheet and close it

ive spent 40 mins searching various similar questions but cant find the
answer - probably due to my very limited understanding of vb - whenever i try
and pinch code its just not working.

could someone please edit the macro below to do what i require and if
possible explain how it works as it would be nice to understand it as well as
use it.

many thanks
Bry


Sub test1()
'
' test1 Macro
' Macro recorded 04/08/2006 by Bry
'

'
Range("A1:I1").Select
Selection.Copy
Workbooks.Open Filename:="C:\bry\NEW QRY LOG TESTING\QRY LOG.xls"
Range("A10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub



All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com