Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using a Named Range to create routing slip in Excel

Using Office 2003 on an XP Professional platform.

I have a workbook that contains several worksheets. I've found code
that will allow the end user to click a button and send only the
current worksheet to whomever s/he wants. However, on one sheet I need
to be able to set it up to be routed. The addresses reside in a Named
Range called "Routing" because the routing may change depending on the
group the requestor belongs to.

I don't know jack about VBA programming (although I've done some C++).
This is what I've managed to cobble together so far:

Sub mcr_MailActiveSheet()
Dim strDate As String
ActiveSheet.Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
ActiveWorkbook.SaveAs ActiveSheet.Name _
& ".xls"
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Delivery = xlOneAfterAnother
.Recipients = Array(Routing)
.ReturnWhenDone = True
.TrackStatus = True
End With
ActiveWorkbook.ChangeFileAccess xlReadOnly
ActiveWorkbook.SendMail "", ActiveWorkbook.Name
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub

The first problem I'm having is that the recipient name is not showing
up when I click the submit button. It brings up a new email but the
"To:" line is empty. I do get multiple security messages ("A program
is trying to access . . ."), though.

The second problem is that I'm having some difficulty with the IF
statement so that the routing portion of the code happens only if
ActiveWorkbook.Name = "Leave_Request.xls"

Any help would be greatly appreciated.

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
creating a routing slip in Microsoft Excel Bob Excel Discussion (Misc queries) 1 August 17th 09 04:30 PM
How do I set up a routing slip in Office Excel 2007? thecapn32 Excel Discussion (Misc queries) 0 February 9th 07 05:18 PM
Excel Routing Slip Joe[_45_] Excel Programming 0 August 1st 06 10:48 PM
Prompt user to create routing slip Kathy Excel Worksheet Functions 0 September 19th 05 03:56 PM
How dynamically create routing slip based on names in specific cel arich Excel Discussion (Misc queries) 1 August 25th 05 11:52 PM


All times are GMT +1. The time now is 09:32 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"