Variable Range in Macro not working.
Hi Jim,
thnx for ur reply in a first place, I´ve tried the code you suggested
and the result is exactly the same. But if i use the porperty COPY instead of
SELECT it doesn´t return the error. Any reason why this should be happening ?
(I´m running Excel 2003)
Tnhx.
"Jim Thomlinson" wrote:
The syntax you have should work (not the way i would do it but it should
work). The only thing I would add is that the variable values can not be 0
and must be less than 65,536... To that end you should be using long and not
integer as integer ends at 32k... If it was me I would be more inclined to do
something like...
Range(cells(fila, "A"), cells(ultimafila, "F")).Select
--
HTH...
Jim Thomlinson
"Nicolas" wrote:
Hi all,
I´m trying to select a range by using 2 integer variables and I get
the following Error msg
----------------------------------------------------
Run-time error '1004':
Application-defined or object-defined error
----------------------------------------------------
The sitax is as follows:
Range("A" & fila & ":" & "F" & ultimafila).Select
Should i type it in a different way ?
All suggestions welcome.
BR.
NICOLAS
|