I need help with Code for a Command button I need the were is says Username to pull this data from a

C

cwebb

Private Sub CommandButton1_Click()
'
' Macro2 Macro
' Macro recorded 4/26/2006 by username
'

'
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Recipients = "User Name" Need the value to pull the information from a Cell on the worksheet to reflect the value of data in a Cell Example: A1= "User" and the Code will reflect .Recipients = "User"
.Subject = "Routing: Form"
.Message = ""
.Delivery = xlOneAfterAnother
.ReturnWhenDone = True
.TrackStatus = True
End With
ActiveWorkbook.Route
End Sub
 
J

Jean-Guy Marcil

cwebb was telling us:
cwebb nous racontait que :
Private Sub CommandButton1_Click()
'
' Macro2 Macro
' Macro recorded 4/26/2006 by username
'

'
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Recipients = "User Name" Need the value to pull the
information from a Cell on the worksheet to reflect the value of data
in a Cell Example: A1= "User" and the Code will reflect .Recipients =
"User"
.Subject = "Routing: Form"
.Message = ""
.Delivery = xlOneAfterAnother
.ReturnWhenDone = True
.TrackStatus = True
End With
ActiveWorkbook.Route
End Sub

This is a Word group... Should have asked in an Excel group...

Also, please, it is more considerate to have the actual question in the
body, not the subject line...

In any case, try this:

.Recipients = .Sheets("SheetName").Range("A1")

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top