ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem in Range VBA excell... (https://www.excelbanter.com/excel-programming/387045-problem-range-vba-excell.html)

JM[_9_]

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)



Helmut Weber[_2_]

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"



excelent

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)




SpeeD72[_2_]

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


Norman Jones

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)




Norman Jones

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




All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com