View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Checking user has input a valid address.

dim teststr as string
dim testrng as range

teststr = "hi there" 'get it someway

set testrng = nothing
on error resume next
set testrng = activesheet.range(teststr)
on error goto 0

if testrng is nothing then
'it's not a range
else
'yep it is
end if


You may want to look at application.inputbox(....,type:=8), too.

Peter Rooney wrote:

--

Dave Peterson