clocks and Excel, or ?

Hello all,

I need to present 2 labels based on the time of day, ...eg, It is now time1, or it is now time 3, I'm having quite a "time" trying every way from Sunday to make it work.

 

I also need to do a VLOOKUP type function in an array, or in an actual excel file (I'd prefer to do it in a SQL way from a local database file.

 

It sort of like a mileage chart on a map. I have a form made up with a list box of 85 selections. When I click one, I need to present the value from my database where the rows and columns meet.

Although I'd like to try using an Excel spreadsheet in vb2005 too, the database is more readily accessible from wherever we locate the app.

 

Thanks,

I have a timer with a clock running, that's ok. I tried the timestring way ...well, you get the idea.

Thanks,

 

Elgee




Answer this question

clocks and Excel, or ?

  • Vasco Veiga

    Well, not really.

    I was able to use timestring and then do an If timestring < ("05:00:00") thing, but it would work only once, then all labels were back to invisible.

    Thanks,

    Elgee



  • i need help&amp;#33;

    Hi Christian,

    I already deleted it. I was so fed up, I gave up. I'll try later. I really need to get the lookup thing done soon.

    Thanks for your help.

    Elgee



  • ToutEnmasm

    Why do you need two labels for one time

    DateTime.Now is what you need.



  • RenaudBXL

    Oh, OK. So you need a timer to change which one is visible Does DateTime.Now solve your problem, or are you still stuck somewhere



  • Zharadan

    You should be comparing the time portion of the DateTime from DateTime.Now, not using strings.

    Perhaps if you post your code from the timer, I'll be able to see what is wrong.



  • KristianH

    Hi,

    Both labels start as invisible. At a predefined time say 5am one label shows until 9am, then it hides, and the other label shows until say, 3pm until 7pm, that is what I should have said.

    Thanks,

    Elgee



  • clocks and Excel, or ?