Link to home
Start Free TrialLog in
Avatar of csehz
csehzFlag for Hungary

asked on

VBA Excel - Selection to variable

Dear Experts,

Probably for you it is a very simple question, how to assign to a Range type variable an actual selected range? This range can be always different, it depends on which cells are selected actually
 

Sub Test()
Dim myRange As Range
myRange = Selection?
End Sub

thanks,
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csehz

ASKER

Thanks Chris
Glad to help, and thanks for the prompt response / grading.

Chris