+ Reply to Thread
Results 1 to 2 of 2

View Routing code

  1. #1
    Mike R.
    Guest

    View Routing code

    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


  2. #2
    gocush
    Guest

    RE: View Routing code

    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

    "Mike R." wrote:

    > 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
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1