Results 1 to 3 of 3

Thread: two quick questions

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    60

    two quick questions

    1) I need to have a YesNo Messagebox pop up only the FIRST time the button procedure is clicked. What is the easiest way to do that?

    2) The Yes button is to replace, or overwrite an existing text file. How do I do that easily?

    I'm just simply writing lines to a text file, and the first time the "Write" button is clicked, then the message box is to pop up. If YES is selected, then the file should be cleared out.


    Thanks!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    #1 - Use a static variable in the click event that acts as a flag

    Static ClickedBefore As Boolean

    If Not ClickedBefore Then Msgbox("Yada Yada")
    ClickedBefore=True

    #2 - Just delete the file and create a new one.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    60
    Thanks.

Posting Permissions

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



Click Here to Expand Forum to Full Width