Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help!!! Code problem 1004

I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Help!!! Code problem 1004

Try

Range("A" & i & ":C" & j).Select
makes a string A1:C21
You'll probably also neet to change
Range("F" & k).Select

Dan E

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Help!!! Code problem 1004

I responded to the other identical question posted at 21:24 - check that one
out.

--

HTH

Bob Phillips

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help!!! Code problem 1004

Ahhhhhhh! Works like a charm. Thanks a million, Dan E!!!

Pingger


-----Original Message-----
Try

Range("A" & i & ":C" & j).Select
makes a string A1:C21
You'll probably also neet to change
Range("F" & k).Select

Dan E

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop



.

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
runtime error code 1004 Karen Excel Worksheet Functions 1 May 13th 10 12:21 AM
JB Bates' Runtime Error 1004 problem Ken Johnson Excel Discussion (Misc queries) 0 December 26th 09 10:32 PM
Error Code 1004 when exporting from VB app to Excel 2007 sue mac Excel Discussion (Misc queries) 0 September 11th 07 08:10 AM
I got this problem run-time error 1004 application defined ... Davide Blau Excel Discussion (Misc queries) 2 July 10th 06 09:27 PM
Coding problem: Runtime 1004 Phil Hageman Excel Programming 0 July 24th 03 05:29 PM


All times are GMT +1. The time now is 03:48 PM.

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"