Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem in Range VBA excell...

Hi.

i have teh folowing code in a excell doc, but it doesn´t work..
Can any one give me a hand? What´s wrong?

thanks!!
Jorge

Range("A1:C1").Select
Selection.AutoFill Destination:=Range("A1:C &
Worksheets("Geral").Cells(3, 31).Value"), Type:=xlFillDefault
Range("A1").Select

I want to copy a selection a ra range of cells that varyby the valeu
inserted in a cell (c31)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Problem in Range VBA excell...

Hi JM,

I've not the faintest idea what you wanna do.

At least in

Destination:=Range("A1:C &
Worksheets("Geral").Cells(3, 31).Value") ...


there seems to be a quotation mark missing!
Destination:=Range("A1:C" &



--

Helmut Weber

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Problem in Range VBA excell...

change Cells(3, 31).Value".... to Cells(31,3).Value"....

"JM" skrev:

Hi.

i have teh folowing code in a excell doc, but it doesn´t work..
Can any one give me a hand? What´s wrong?

thanks!!
Jorge

Range("A1:C1").Select
Selection.AutoFill Destination:=Range("A1:C &
Worksheets("Geral").Cells(3, 31).Value"), Type:=xlFillDefault
Range("A1").Select

I want to copy a selection a ra range of cells that varyby the valeu
inserted in a cell (c31)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Problem in Range VBA excell...

On Apr 8, 6:50 pm, Helmut Weber wrote:
Hi JM,

I've not the faintest idea what you wanna do.

At least in

Destination:=Range("A1:C &
Worksheets("Geral").Cells(3, 31).Value") ...


there seems to be a quotation mark missing!

Destination:=Range("A1:C" &


--

Helmut Weber

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


Hi helmut

Great eye! some times you look at things but you see them.... MY
CASE!!! LOL

Thanks a lot!
JM

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Problem in Range VBA excell...

Hi JM,

Try:

'=============
Public Sub Tester()
Dim SH As Worksheet
Dim i As Long

Set SH = ActiveSheet '<<==== CHANGE

i = Worksheets("Geral").Range("AE3").Value


Range("A1:C1").AutoFill Destination:=Range("A1:C" & i), _
Type:=xlFillDefault
End Sub
'<<=============


---
Regards,
Norman



"JM" wrote in message
...
Hi.

i have teh folowing code in a excell doc, but it doesn´t work..
Can any one give me a hand? What´s wrong?

thanks!!
Jorge

Range("A1:C1").Select
Selection.AutoFill Destination:=Range("A1:C &
Worksheets("Geral").Cells(3, 31).Value"), Type:=xlFillDefault
Range("A1").Select

I want to copy a selection a ra range of cells that varyby the valeu
inserted in a cell (c31)





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Problem in Range VBA excell...

Hi JM,

The code was intended as:

'=============
Public Sub Tester()
Dim SH As Worksheet
Dim i As Long

Set SH = ActiveSheet '<<==== CHANGE

i = Worksheets("Geral").Range("AE3").Value


SH.Range("A1:C1").AutoFill Destination:=Range("A1:C" & i), _
Type:=xlFillDefault
End Sub
'<<=============


---
Regards,
Norman


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
problem in Excell 2003 Bob[_18_] Excel Discussion (Misc queries) 4 October 15th 09 08:36 PM
Excell worksheet problem parttimer Excel Discussion (Misc queries) 2 September 22nd 09 04:37 PM
excell network problem mtevensorrison Excel Discussion (Misc queries) 2 February 23rd 06 09:07 AM
Excell version problem??? Mabe-GE Excel Worksheet Functions 4 January 24th 06 11:19 PM
Excell Workbook problem dcost Excel Worksheet Functions 1 June 20th 05 09:30 PM


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