View Routing code

G

Guest

Hello,
I am using a workbook with routing. Once the user sets up the routing, I
would like to display the routing recipients on the actual worksheet. Here
is the vb routing code, I just can not figure out how to pull the recipients
out if they are not stated in the code, rather the user sets it up:
Workbooks("BOOK1.XLS").HasRoutingSlip = True
With Workbooks("BOOK1.XLS").RoutingSlip
.Recipients = Array("Adam Bendel", _
"Jean Selva", "Bernard Gabor")
End With

If the above example, the vb codes set up the recipients, but in my book,
the user will set it up. Help please... thanks!
mike
 
G

Guest

does something like this work:

Dim sRecipList As String

Range("MyRecipients").Select 'Say in cells A1:A10
Do While ActiveCell <> ""
sRecipList = sRecipList & ", " & ActiveCell
ActiveCell.Offset(1, 0).Select
Loop

'Get rid of the first ","
sRecipList = Mid(sRecipList, 3)
MsgBox sRecipList

'Then your code line
.Recipients = sRecipList
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top