Welcome,
Guest
. Please
login
or
register
.
February 18, 2025, 01:58:52 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 2281 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:
Yotematoi
February 14, 2025, 12:41:48 PM
|iR|Focalor
February 13, 2025, 07:31:24 AM
I was on DM this morning for the first time in a pretty long time. Seemed fine to me.
0rbisson
February 13, 2025, 04:54:21 AM
DM server is fucked. 2 point blank rockets from spawn and lava damage and player survived? WTF?" Also someone has fucked with the spawn points, every single time no matter how big the map you spawn right in front of the person who killed you last
rikwad
February 08, 2025, 10:48:18 PM
Seattle FFA now has working HTTP downloads. Thanks Unholy!
RIP Pepp ✟
-Unh0ly-
February 03, 2025, 01:20:14 AM
vvvALL WEAPS HAVE MUZZLE FLASH vvvv
-Unh0ly-
February 03, 2025, 01:03:56 AM
NEW UNHOLY QUAKE 2!!!!
https://drive.google.com/file/d/1E76HYyMapGvP6gUgy04Mve2UsZEL0bb0/view?usp=sharing
|iR|Focalor
December 25, 2024, 12:15:35 AM
|iR|Focalor
December 25, 2024, 12:06:54 AM
RailWolf
December 23, 2024, 09:15:50 AM
Fixed the image for you =)
And Die Hard is a great Christmas movie
|iR|Focalor
December 19, 2024, 04:55:07 AM
correction - you gotta put the whole word, not just w: {img width=210}
Show 50 latest
User
Welcome,
Guest
. Please
login
or
register
.
February 18, 2025, 01:58:52 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced search