More excel

  Josquius 20:12 31 Mar 2004
Locked

On excel how can you get VB programmes to run when you open up the document in question?

Also is there anyway to make things happen on certain dates without saying if date= 1/2/05
(i.e. the first of the month every month)

  VoG II 20:19 31 Mar 2004

Sub Auto_Open()

If Day(Now()) = 1 then

Call MySubroutine

End If

End Sub

  daba 20:23 31 Mar 2004

2 answers in one !!

  Josquius 20:25 31 Mar 2004

Is there anyway to make something happen only once a day?
I've realised auto open is not such a good idea as the computer won't be on all day...

  VoG II 20:29 31 Mar 2004

The obvious way would be to get the auto_open macro to write the date to a worksheet (maybe hidden). Then when it starts to check if that date matches Now() and if it does Exit Sub

  Josquius 20:34 31 Mar 2004

Hmm good point...
Why hide it actually, I'll put it on the main sheet easy to see.
Thanks VoG.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

Halloween Photoshop & Illustrator tutorials: 20 step-by-step guides to creating spook-tacular…

iPhone X news: Release date, price, new features & specs

Comment créer, modifier et réinitialiser un compte Apple ?