Excel programming question
Results 1 to 4 of 4

Thread: Excel programming question

  1. #1
    Senior Member
    Join Date
    Sep 2005
    Posts
    332

    Excel programming question

    I am trying to write an auto_start macro for an excel workbook. I have very little programming experience, took a true basic class back in '98, and was looking for a little help or direction. All i need is the command to pause execution. I think i remember in true basic it was litterally just

    Pause 4

    and the execution of code would hold for 4 sec. What is the command to do something like this in visual basic, which is the language used in excel?
    \"He who shall introduce into public affairs the principles of primitive Christianity will change the face of the world.\"
    Benjamin Franklin

  2. #2
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    IIRC Office uses VBA (Visual Basic for Applications) since 98 (not sure about the version). Before that it used a macro language..

    These may help:
    http://msdn.microsoft.com/office/dow...a/default.aspx
    http://www.mindspring.com/~tflynn/excelvba.html
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  3. #3
    Super Moderator: GMT Zone nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,190
    IIRC you insert a line in your macro like this:

    Application.Wait Now + TimeValue("00:00:04")

    But it has been a long time since I have used it
    If you cannot do someone any good: don't do them any harm....
    As long as you did this to one of these, the least of my little ones............you did it unto Me.
    What profiteth a man if he gains the entire World at the expense of his immortal soul?

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Posts
    332
    Thanks nihil that was exactly what i needed, and the syntax is correct. i just coppied and pasted it into my macro and it works, i did change the delay to 2 sec but that doesn't really matter.
    \"He who shall introduce into public affairs the principles of primitive Christianity will change the face of the world.\"
    Benjamin Franklin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •