View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Passing Strings from UserForm to Module

Sub Main()
Dim sStr as String
sStr = "A1:B30"
mysub sStr
End Sub

Sub MySub(sStr1 as String)
msgbox Range(sStr1).Address(External:=True)
End Sub

--
Regards,
Tom Ogilvy

"John Kauffman" wrote in message
...
Using VBA, I want to collect a range from the user with a UserForm, and

then pass the range string to a subroutine in a module. I can pass numbers
in this fashion, but I am unsuccessful passing strings. Any suggestions?