Select range in VBA through variabel

M

Mr. Smith

Hi I try this code, but I will not work.

sub selectnamedrange(fblock as Integer)
dim frow_string
frow_string = "f" & fblock & "_frow"
Range(frow_string).Select

' Which is translated into Range("f1_frow").Select
' f1_frow is a named range in the current worksheet.....
' The sub contains more code, but this is the part that does not work....
end sub.

Any hints appreciated

Mr. Smith
 
B

Bob Phillips

Works fine for me. Are you sure that fblock is 1?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
M

Mr. Smith

Works now....
Needed ActiveSheet.range instead of just Range

thanks anyway Bob

Kind regards
Mr. Smith
 
Top