Excel Reminders
Excel Reminders
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 10 of 10

Thread: Excel Reminders

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I want my excel template after every 250 processes to notify me a message (eg. Save To CD writer) does anyone know how to do this?

  2. #2
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,605
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    What constitutes a "process"?

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    A process for example I data on a built-in data form and it copies that sends it to my invoice, well after every say 100 times it does this I would like it to notify me that it has done 250 process with a message box

  4. #4
    New Member
    Join Date
    Feb 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    *100 sorry

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Chippenham, UK
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-28 12:32, Arash_The_A_Level_Student wrote:
    A process for example I data on a built-in data form and it copies that sends it to my invoice, well after every say 100 times it does this I would like it to notify me that it has done 250 process with a message box
    This process, is this done with a Macro?

    If so add a variable, initialise it to zero and add 1 every time the macro is run. Then use:

    If myVariable = 250 Then

    MsgBox("Your Message")
    myVariable = 0
    End If


    Would the messagebox only be required after 250 times no matter where the process was by the time that the workbook was closed or would you like to also show the message on closing the workbook?

    Would the counting need to start from 1 when the workbook was opened or would it need to continue on from when the workbook was last saved?



    Regards,

    Gary Hewitt-Long

  6. #6
    New Member
    Join Date
    Feb 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    sorry stupid question I know nothing about VBA but how do you add a variable?

  7. #7
    Board Regular hennahairgel's Avatar
    Join Date
    Feb 2002
    Location
    Bristol, England
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    right at the beginning, before the fist sub write

    dim processcount string

    then at end of variable write

    if processcount = 250 then
    save bit goes in here

    processcount =250
    else
    processcount - processcount + 1

    hope this is what you want.
    Henry

  8. #8
    Board Regular hennahairgel's Avatar
    Join Date
    Feb 2002
    Location
    Bristol, England
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    sorry
    dim processcount as string

  9. #9
    MrExcel MVP Joe Was's Avatar
    Join Date
    Feb 2002
    Location
    Central Florida, USA
    Posts
    7,539
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Right click a sheet tab lable, then select "View Code" from the list on your left dubble click "ThisWorkBook" and paste a copy of this code on to the sheet on your right. Hope this helps. JSW

    Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
    Dim myTest As Integer
    Static x As Integer
    'By: Joe Was, 2/2002

    x = x + 1
    myTest = x
    If myTest >= 250 Then
    MsgBox "Time to Save"
    x = 0
    Else
    GoTo myEnd
    End If
    myEnd:

    End Sub

    Thanks for the edit Gary, forgot the reset, was about to re-submit an updated copy and saw your post, thanks. JSW

    [ This Message was edited by: Joe Was on 2002-03-01 13:37 ]

    [ This Message was edited by: Joe Was on 2002-03-01 13:39 ]

  10. #10
    Board Regular
    Join Date
    Feb 2002
    Location
    Chippenham, UK
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-03-01 11:05, Joe Was wrote:
    Right click a sheet tab lable, then select "View Code" from the list on your left dubble click "ThisWorkBook" and paste a copy of this code on to the sheet on your right. Hope this helps. JSW

    Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
    Dim myTest As Integer
    Static x As Integer
    'By: Joe Was, 2/2002

    x = x + 1
    myTest = x
    If myTest >= 250 Then
    MsgBox "Time to Save"
    Else
    GoTo myEnd
    End If
    myEnd:

    End Sub
    You need to reset x to 0 after the message box has been shown otherwise x will always be >=250

    Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
    Dim myTest As Integer
    Static x As Integer
    'By: Joe Was, 2/2002

    x = x + 1
    myTest = x
    If myTest >= 250 Then
    MsgBox "Time to Save"
    x = 0
    Else
    GoTo myEnd
    End If
    myEnd:

    End Sub
    Regards,

    Gary Hewitt-Long

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com