#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default ERRORS IN CODE 2003

Hi all gurus, i am getting errors on the code below:

I can click a worksheet and select multiple email addresses but its not
working.

Set EmailAddr = Application.InputBox("Select Email Addresses - Click on the
Email Worksheet" & vbCrLf & _
"Hold down Ctrl Key to select multiple addresses", Type:=8)

Neil.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default ERRORS IN CODE 2003

Neil the code will create a range and it can be non contiguous by holding
down the ctrl key and clicking. Try this and it will loop through that range
giving the address of each cell.

Dim EmailAddr As Range
Set EmailAddr = Application.InputBox("Select Email Addresses - Click on the
Email Worksheet" & vbCrLf & _
"Hold down Ctrl Key to select multiple addresses", Type:=8)


For Each c In EmailAddr
MsgBox c.Address
Next
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Neil Holden" wrote:

Hi all gurus, i am getting errors on the code below:

I can click a worksheet and select multiple email addresses but its not
working.

Set EmailAddr = Application.InputBox("Select Email Addresses - Click on the
Email Worksheet" & vbCrLf & _
"Hold down Ctrl Key to select multiple addresses", Type:=8)

Neil.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 + hungapp errors rick m Excel Discussion (Misc queries) 0 March 25th 08 09:27 AM
Errors in VB Code since adding macro Susan Excel Discussion (Misc queries) 1 April 11th 06 08:42 PM
errors in Excel 2003 Kilbrennan Excel Discussion (Misc queries) 0 April 6th 06 11:32 AM
VBA Code Errors PaulW Excel Discussion (Misc queries) 3 April 4th 06 01:21 PM
Calling a bit of code from a sheet errors gearoi Excel Discussion (Misc queries) 2 September 6th 05 08:21 PM


All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"