Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JulianB
 
Posts: n/a
Default Dave My New Macro

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian


--

Dave Peterson
  #3   Report Post  
JulianB
 
Posts: n/a
Default

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian


--

Dave Peterson

  #4   Report Post  
JulianB
 
Posts: n/a
Default

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian


"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian


--

Dave Peterson

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

You're dropping a double quote:

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

The A9 is surrounded by double quotes: "a9"

and I didn't notice this before, but you have another typo:

For Each myCell In myrng.Cell
should be
For Each myCell In myrng.Cells

(add an S to CellS)

JulianB wrote:

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian

"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
JulianB
 
Posts: n/a
Default

Thanks, I am a typo Champ. I'll let you know

Julian

"JulianB" wrote:

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian


"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

--

Dave Peterson

  #7   Report Post  
JulianB
 
Posts: n/a
Default

BINGO It works. Thank you, Thank you, Thank you.

I can now use this as a Sub of other massive lists that need to be printed
out individually.

Thanks again

Julian

"JulianB" wrote:

Thanks, I am a typo Champ. I'll let you know

Julian

"JulianB" wrote:

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian


"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

--

Dave Peterson

  #8   Report Post  
JulianB
 
Posts: n/a
Default

BINGO It works. I can now use this for other massive lists that need to be
printed out individually.

Thanks again,

Julian

"JulianB" wrote:

Thanks, I am a typo Champ. I'll let you know

Julian

"JulianB" wrote:

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian


"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

--

Dave Peterson

  #9   Report Post  
Dave Peterson
 
Posts: n/a
Default

You're welcome.


JulianB wrote:

BINGO It works. I can now use this for other massive lists that need to be
printed out individually.

Thanks again,

Julian

"JulianB" wrote:

Thanks, I am a typo Champ. I'll let you know

Julian

"JulianB" wrote:

Dave I copied and pasted but the error message says Expected: List Seproator
or )
with the "A" highlighted. See below.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
Set myrng = .Range("A9,.Cells(.Rows.Count,"A").End(xlup)) <Error is here
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Sorry if i blew it

Julian


"JulianB" wrote:

Thanks I'll try to copy and paste your original Sub.

I'll let you know what happens. By the way, what are you doing up this early.

Julian

"Dave Peterson" wrote:

Either I messed up or you messed up with some typos!

With Worksheets("balances04")
Set myrng = .Range("a9", .Cells(.Rows.Count, "A").End(xlUp))
End With

Sometimes it's better to copy and paste from the newsgroup post than to retype
the code.

JulianB wrote:

Hi!

Thanks for you help. I am still getting a "syntax error" with your
corretions. Can you tell me what this means in plain english. The computer
thinks i'm a pro while i'm only a rookie.

Sub PrintReports9A()
Dim myCell As Range
Dim myrng As Range

With Worksheets("balances04")
set myrng = .range("a9,.cells(.rows.count,"A".end(xlup)) <the error is in
this line
End With


For Each myCell In myrng.Cell
With Worksheets("STATEMENT")
.Range("C11").Value = myCell.Value
.Range("D24").Value = myCell(1, 2).Value
.Range("J11").Value = myCell(1, 3).Value
.Range("H25").Value = myCell(1, 6).Value
.Range("J32").Value = myCell(1, 13).Value
.Range("J34").Value = myCell(1, 14).Value
.PrintOut
End With
Next myCell

End Sub

Thank you

Julian

--

Dave Peterson


--

Dave Peterson
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
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Attn: Dave P. Question re Pix Calls via Macro DocuMike Excel Discussion (Misc queries) 1 January 10th 05 01:38 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro Formula revision? Mark Excel Worksheet Functions 1 November 28th 04 01:43 AM


All times are GMT +1. The time now is 09:46 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"