Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Recording simple Macro

I have a workbook with different sheets
I fill in data on the balance sheet
copy cheques data into sheet2, a list of all cheques &
copy invoice data into sheet3, a list of all invoices
I have recorded a macro and assigned it to a new button
for each of these tasks
The only problem is, after pasting the data into sheet 2 or 3
I need to move down to select the next empty cell before finishing so that
it is set up ready for the next use of the macro.
Recording the macro does this fine the first time but as it specifies the
actual cell selected it always returns to the same cell, hence it will only
paste into the first two cells.
I would like it to move down one cell from which ever cell is selected
without specifying the location can anyone tell me how to do this or how to
edit my original macro

Sub ChequesOut()
'
' ChequesOut Macro
' Macro recorded 14/07/2005 by D L
'

'
Selection.Copy
Sheets("Cheques").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("D4").Select (THIS IS THE PROBLEM)
Sheets("Spreadsheet").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 43
End With
End Sub

Thanks to anyone who may endevour to help
Dave


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Recording simple Macro

Change
Range("D4").Select
to
Range("D65536").End(xlUp).Offset(1,0).Select
--
HTH...

Jim Thomlinson


"Dave" wrote:

I have a workbook with different sheets
I fill in data on the balance sheet
copy cheques data into sheet2, a list of all cheques &
copy invoice data into sheet3, a list of all invoices
I have recorded a macro and assigned it to a new button
for each of these tasks
The only problem is, after pasting the data into sheet 2 or 3
I need to move down to select the next empty cell before finishing so that
it is set up ready for the next use of the macro.
Recording the macro does this fine the first time but as it specifies the
actual cell selected it always returns to the same cell, hence it will only
paste into the first two cells.
I would like it to move down one cell from which ever cell is selected
without specifying the location can anyone tell me how to do this or how to
edit my original macro

Sub ChequesOut()
'
' ChequesOut Macro
' Macro recorded 14/07/2005 by D L
'

'
Selection.Copy
Sheets("Cheques").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("D4").Select (THIS IS THE PROBLEM)
Sheets("Spreadsheet").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 43
End With
End Sub

Thanks to anyone who may endevour to help
Dave



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Recording simple Macro

Thanks for your time and help

Dave


"Jim Thomlinson" wrote in message
...
Change
Range("D4").Select
to
Range("D65536").End(xlUp).Offset(1,0).Select
--
HTH...

Jim Thomlinson


"Dave" wrote:

I have a workbook with different sheets
I fill in data on the balance sheet
copy cheques data into sheet2, a list of all cheques &
copy invoice data into sheet3, a list of all invoices
I have recorded a macro and assigned it to a new button
for each of these tasks
The only problem is, after pasting the data into sheet 2 or 3
I need to move down to select the next empty cell before finishing so

that
it is set up ready for the next use of the macro.
Recording the macro does this fine the first time but as it specifies

the
actual cell selected it always returns to the same cell, hence it will

only
paste into the first two cells.
I would like it to move down one cell from which ever cell is selected
without specifying the location can anyone tell me how to do this or how

to
edit my original macro

Sub ChequesOut()
'
' ChequesOut Macro
' Macro recorded 14/07/2005 by D L
'

'
Selection.Copy
Sheets("Cheques").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("D4").Select (THIS IS THE PROBLEM)
Sheets("Spreadsheet").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 43
End With
End Sub

Thanks to anyone who may endevour to help
Dave





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
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Recording simple macro Dave Excel Worksheet Functions 5 July 16th 05 12:34 AM
Recording simple macro Dave Setting up and Configuration of Excel 2 July 16th 05 12:18 AM
Macro recording Ron McCormick[_2_] Excel Programming 7 September 2nd 03 07:30 PM


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

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

About Us

"It's about Microsoft Excel"