maccten2000
Programmer
Hi All,
Basically I have macro that calls a function
I want to make this function as generic as possible for maybe someday being able to use it in future for something else
I want to pass in a variable of cell ranges like for example "A1:B2"
I then wish to subtitute the static "A1:B2" variable in the function with the passed in variable so a practical rough example is below for clarity
My concern is the qoutes seem to be causing issues and it doesnt seem to accept it if i try and manufacture qoutes around the variable
Any help would be greatly appreciated
Thanks
Basically I have macro that calls a function
I want to make this function as generic as possible for maybe someday being able to use it in future for something else
I want to pass in a variable of cell ranges like for example "A1:B2"
I then wish to subtitute the static "A1:B2" variable in the function with the passed in variable so a practical rough example is below for clarity
Code:
dim strRange "A1:B2"
x = SelectRange (strRange)
function SelectRange(strRange) as boolean
SelectRange = Range(strRange).Select
end function
My concern is the qoutes seem to be causing issues and it doesnt seem to accept it if i try and manufacture qoutes around the variable
Any help would be greatly appreciated
Thanks