How to set a range which its and last interval are parameters not texts؟
I have written a macro, in a part of it, I want to set a range which its first and last interval are parameters not texts. (the value of cell03 and cell04 are $R46 and $R46 respectively.). But when running the code, the excel encounters an error saying “Run time error 1004,method range of object global failed. Can anybody Guides me on this issue? (the part of Macro whit this problem is as follow:
nb = Range("g8").Value
nba = Range("g9").Value
Range("R1").Select
ActiveCell.Offset(nsalesam, 0).Activate
cell01 = ActiveCell.Address(0, 1)
ActiveCell.Offset(nproducts01, 0).Activate
cell02 = ActiveCell.Address(0, 1)
Set products = Range("&cell01&:&cell02&")
Last edited by soroush.kalantari; 04-03-2022 at 07:50 PM.
|