Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW CAN I EASILY REMOVE MULTIPLE BLANK ROWS FROM A SPREADSHEET? | Excel Discussion (Misc queries) | |||
How do I find the last row containing data in a spreadsheet | Excel Discussion (Misc queries) | |||
Imported Data creates blank cells that aren't really blank | Excel Worksheet Functions | |||
BLANK EXCEL PAGE STILL EXIST AFTER I CLOSE OUT SPREADSHEET? | New Users to Excel | |||
Cant find the Formatting Toolbar on my Spreadsheet. | Excel Worksheet Functions |