Presagio_Morte
08-07-2001, 07:37 AM
I'm trying to learn how to read the date in a cell, and compare it to the current date. The spreadsheet is an equipment calibration schedule, btw. The list is HUGE, so going through it every week by hand takes forever, and a nice pop-up window with upcoming equipment would be great.
I don't know much about VB, but I did a lot of Turbo Pascal, Interactive C, and C++, so I thought I could just go through the help files and figure it out. Unfortunately, that's not working. I'd really appreciate any help you guys could give me.
Thanks.<P ID="edit"><FONT class="small"><EM>Edited by Presagio_Morte on 08/07/01 08:42 AM.</EM></FONT></P>
Thinker
08-07-2001, 08:00 AM
You need to give some additional information like what you have tried so far and where you are stuck. Some code samples would be helpful too.
I think therefore I am... sometimes right. images/icons/wink.gif
Presagio_Morte
08-08-2001, 05:54 AM
Wel, I just started the project yesterday, so I really didn't get the chance to play around TOO much with it. I came up with all of the steps I would need to take except how I would read the dates from the cells.
I was actually thinking that it might be easiest to just give up all of the formatting and save the sheet as CSV. I didn't want to do that, though. I just saw that there was another person (Boomer I think) who was accessing data from cells in Excel, so I know it has to be possible, I just don't know enough VB to do it. You actually replied to his postings, I think.
Oh, and I am using the VB editor that comes with Office 97, if that makes a difference.
Thinker
08-08-2001, 08:01 AM
If you are doing this from the VB editor within the workbook opened in Excel, it really isn't very difficult. The fastest way to see how it is done is to select Macro from the Tools menu and then select Record New Macro. Give it a name. Then do the steps manually that you want the program to do. When you are through, click the stop recording macro. When you open up the VB Editor you should see the code in a Module (select the module and click view code in the project explorer window.)
Hope this helps.
I think therefore I am... sometimes right. images/icons/wink.gif
KesleyK
08-15-2001, 02:56 PM
You'll want to use either <font color=blue>ActiveSheet</font color=blue> or <font color=blue>Worksheets(x)</font color=blue> with:
.Range("A1").Value
along with Date()
Working with dates in Excel I think is a bit more tricky than dealing with dates in VB but it can still be done.
"Recently reported by the Assoc. of Incomplete Research, 7 out of 10 people." -- K. Nealon, SNL
Presagio_Morte
08-16-2001, 12:52 PM
Ok, I feel like a bit of an ***. I replied to this saying that I figured everything out, and thanks for the help. I don't know why it's not here, though. Oh well, guess I'll say it again.
Thanks for the help with VBA. I can honestly say that I learned a lot working on that project, but I can hardly say I know VB now.
Anyway, I'll be sure to bug you guys again when I give up trying to get the listbox to work ;)
KesleyK
08-16-2001, 03:33 PM
np, and best of luck to you
"Recently reported by the Assoc. of Incomplete Research, 7 out of 10 people." -- K. Nealon, SNL