Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

input box to allow range OR strings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 21 Nov 2007 17:42 GMT
Hi,

I'd like the user to either select the range of cell with email addresses or
type it OR be able to type them in directly.  I can only think of one either
declare a range or string.  for example, when declaring a range my code looks
like following:

      Set rngTo = Application.InputBox("Select range with addressees emails
for the 'TO:' field" & _
       vbNewLine & "or enter emails here separated by semicolon", "Select",
Type:=8)

This won't allow a string to be typed in...
Can anything suggest the workaround?  
Thank you,
Signature

______
Regards,
Greg

FSt1 - 21 Nov 2007 18:44 GMT
hi
tricky problem. you could use a msgbox to get a yes/no responce. something
like this...
 Dim rngto As Range
   Dim stgto As String
If MsgBox("Do you wish to enter the mail addresses?" & vbNewLine & _
          "Click yes?" & vbNewLine & _
          "Or to select email addresses by range" & vbNewLine & _
          "Click No") = vbNo Then
   Set rngto = Application.InputBox("Select range with addressees emails
for the 'TO:' field")
   Else
       Set stgto = Application.InputBox("Enter emails here separated by
semicolon.")
End If

lot of extra code but it would solve the delima.

Regards
FSt1

> Hi,
>
[quoted text clipped - 11 lines]
> Can anything suggest the workaround?  
> Thank you,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.