Welcome,
Guest
. Please
login
or
register
.
May 24, 2025, 10:30:30 PM
News:
tastyspleen.net discord server:
http://discord.tastyspleen.net
Home
Forum
Help
TinyPortal
Search
Calendar
Login
Register
tastyspleen::quake 2 community
»
Forum
»
Off-Topic Zone
»
/dev/random
»
Visual Basic and excel
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Visual Basic and excel (Read 2366 times)
Moving Shadow
Full Member
Posts: 212
Rated:
Visual Basic and excel
«
on:
December 26, 2007, 08:34:40 AM »
Anyone here a VBA/excel whiz?
I am trying to pull a date from a cell in an excel worksheet and make it as a task item in Outlook. Every time I run this VBA macro in excel, the date pulled into the tasks list will default to Fri 12/29/1899. Can any one shed some light one this?
Below is the code:
Sub Create_Task()
Dim olApp As Outlook.Application
Dim olTask As Outlook.TaskItem
Set olApp = New Outlook.Application
Set olTask = olApp.CreateItem(3)
Application.ScreenUpdating = False
With olTask
.Subject = "Do this Now"
.Body = "You need to do this"
.StartDate = Range("A2").Select
.DueDate = Range("B2").Select
.Status = olTaskWaiting
.Importance = olImportanceHigh
.ReminderPlaySound = True
.Companies = "Your Moml"
.Save
End With
Set olTask = Nothing
Set olApp = Nothing
Application.ScreenUpdating = True
MsgBox "The task-list updated successfully.", vbInformation
End Sub
Logged
[BTF]RottenRose
Full Member
Posts: 239
Rated:
Re: Visual Basic and excel
«
Reply #1 on:
December 26, 2007, 11:35:55 AM »
I'm not a wiz and I feel pitty on anyone that is when it comes to vb. Could you may be add some notes so others and I can try to understand what you're trying to do with your code. I can read your code, but I don't totally know what you're trying to do with it. You might want to check and see if you skipped a step or mispelled something, vb will chew you up I know if you do something like that.
Logged
Ways to love Tastyspleen.tv
Radio:
http://bit.ly/1vbPDQ
Video:
http://bit.ly/d1htz
Movie:
http://bit.ly/axvufM
facebook:http://on.fb.me/96nVXz Twitter:
http://bit.ly/h3zyaP
Moving Shadow
Full Member
Posts: 212
Rated:
Re: Visual Basic and excel
«
Reply #2 on:
December 26, 2007, 12:06:58 PM »
I got figured out.
.StartDate = Range("A2").Select should have been .StartDate = Range("A2").Value
weehaw. Thanks anyways Rose!
Logged
peewee_RotA
Brobdingnagian Member
Posts: 4152
Hi, I'm from the gov'ment and I'm here to help you
Rated:
Re: Visual Basic and excel
«
Reply #3 on:
December 26, 2007, 03:10:32 PM »
VBA in excel is like sugar in a gas tank. Especially since porting ANYTHING in excel written in VBA requires lowering the standard "security" settings, the installation of a valid certificate, and the constant reminder that you're running scripts. And not the least of which is the fact that VBA scripts cannot run in Excel Viewer, which would be their only real function.
For example if I have a spread sheet listing part numbers and their OEM part numbers and create a script to help sort them. I cannot distribute this script without purchasing a new and most recent copy of Excel for every computer I want to view this on.
I could ramble for hours. Basically VBA is great for Outlook but a waste for everything else.
Logged
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
Tune in to the
Tastycast!!!!
http://dna.zeliepa.net
Moving Shadow
Full Member
Posts: 212
Rated:
Re: Visual Basic and excel
«
Reply #4 on:
December 27, 2007, 10:01:52 AM »
ok this may be a simplier question. I'd like to take the code that I have above, and use it for different tasks. Is there anyway to do that? Right now, it will only import 1 startdate and one due date... I'd like to do more.
Any suggestions?
Logged
jägermonsta
Brobdingnagian Member
Posts: 4441
Bigger Than Jesus
Rated:
Re: Visual Basic and excel
«
Reply #5 on:
December 31, 2007, 07:47:22 AM »
www.google.com
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
tastyspleen::quake 2 community
»
Forum
»
Off-Topic Zone
»
/dev/random
»
Visual Basic and excel
El Box de Shoutamente
Last 10 Shouts:
-Unh0ly-
Today
at 10:08:35 PM
https://drive.google.com/file/d/1qwsj3EM4s5svp0b8oJLZt_An6990RB-o/view?usp=sharing
QUAKE 2 RTX
-Unh0ly-
May 22, 2025, 05:45:28 PM
https://drive.google.com/file/d/1VB1if3QjStPWCpbB33vbx7OOef-Negd3/view?usp=sharing
DUST 2 HD TEXTURES PUT IN BASEQ2 folder
Yotematoi
May 17, 2025, 08:33:15 AM
Yo desde el año 2007 me enfermé de Q2, es incurable
Morir y revivir es costumbre, lástima q el QT estaba bueno
ImperiusDamian
May 12, 2025, 01:45:35 AM
Quake II is not 27 years old. I refuse to accept THAT much time has gone by.
|iR|Focalor
May 11, 2025, 02:33:39 PM
-Unh0ly-
May 03, 2025, 08:02:46 AM
198.179.6.200:30634
Yotematoi
May 02, 2025, 10:27:47 AM
Note for Player-4109 "Remember, the Guinness Book of Records does not include cowards who shot at someone by treachery."
-Unh0ly-
April 20, 2025, 09:52:16 AM
https://drive.google.com/file/d/1hKRIIKPk_G9TLPpY3B4ZIbVK_00Mbwfw/view?usp=sharing
|iR|Focalor
April 02, 2025, 02:47:07 AM
Yotematoi
February 14, 2025, 12:41:48 PM
Show 50 latest
User
Welcome,
Guest
. Please
login
or
register
.
May 24, 2025, 10:30:30 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced search