Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bry Bry is offline
external usenet poster
 
Posts: 14
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW CAN I EASILY REMOVE MULTIPLE BLANK ROWS FROM A SPREADSHEET? sandman832 Excel Discussion (Misc queries) 2 March 9th 06 08:31 PM
How do I find the last row containing data in a spreadsheet alx613 Excel Discussion (Misc queries) 2 March 3rd 06 03:07 PM
Imported Data creates blank cells that aren't really blank JackieD Excel Worksheet Functions 14 February 23rd 06 12:57 AM
BLANK EXCEL PAGE STILL EXIST AFTER I CLOSE OUT SPREADSHEET? still learning New Users to Excel 2 May 22nd 05 11:50 AM
Cant find the Formatting Toolbar on my Spreadsheet. FREDA Excel Worksheet Functions 4 March 1st 05 05:49 PM


All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"