LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Task option control

I have the following code that work somewhat okay when I create a new Task
record. Where I start running into problems is with the "With" Statement,
Specifically the
..Body = c.Offset(0, 2).Value
..DueDate = c.Offset(0, 5).Value
Options...

I am trying to get my code to pick specific information out of the row the
user starts the macro on to set up the task with limited interaction with the
user. If I change the above to
.Body = "Anything"
.DueDate = "3/25/08"
Everything works fine. But again this information is specific to my code and
does not allow for customized tasked based on user control.

Option Explicit
Sub CreateNewTask()

Dim olApp As Object
Dim olTsk As Object
Dim c As Range

Set olApp = CreateObject("outlook.application") ' New Outlook.Application
Set olTsk = olApp.CreateItem(3) ' OLTaskitem

With olTsk
.Subject = "Follow Up on Quote"
.Status = 1 ' olTaskInProgress
.Importance = 2 ' olImportanceHigh
.Body = c.Offset(0, 2).Value
.DueDate = c.Offset(0, 5).Value
.TotalWork = 40
.ActualWork = 20
.Display
.Save
End With

Set olTsk = Nothing
Set olApp = Nothing

End Sub

Can some one help and point me in the right direction.

Thanks
Peter W
 
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
where will i get task pane option in Excel Guru Excel Discussion (Misc queries) 2 January 21st 08 03:38 PM
Setting an option control Patrick Simonds Excel Programming 1 April 4th 06 03:25 AM
Control Box Option Buttons jlarkin Excel Programming 4 April 23rd 04 12:31 AM
Option button task D. Miller Excel Programming 3 January 22nd 04 05:57 AM
Option Button Control Rod[_4_] Excel Programming 0 September 16th 03 11:30 PM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"