+ Reply to Thread
Results 1 to 6 of 6

Run 3 macros with VB Code

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Run 3 macros with VB Code

    Hello:

    I need a VB Macro to run 3 macros one after another with 5 sec delay between each.

    Assume Name of the macro as Macro1, Macro2 and Macro3

    Thanks and let me know if you have any questions

    Riz Momin
    Last edited by rizmomin; 03-24-2013 at 01:40 PM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Run 3 macros with VB Code

    Hi, Riz Momin,

    maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Run 3 macros with VB Code

    Hi HaHoBe:

    Please Login or Register  to view this content.
    Sub RsetValues()
    Dim Rng As Range
    Application.Calculation = xlManual
    'Change UsedRange to range("a1:d50") or range("a1:b50","d1:d50")- use cell refence that you need to change.
    Application.GoTo Cells(119, 15)
    For Each Rng In Sheets("Dly_Recpt").Range("O119:EG606")
    If IsNumeric(Rng) Then
    If Not IsDate(Rng) Then
    If Rng > 0 Or Rng < 0 Then
    Rng = 0
    End If
    End If
    End If
    Next Rng
    End Sub
    Sub RsetFactor()
    Dim Rng As Range
    'Change UsedRange to range("a1:d50") or range("a1:b50","d1:d50")- use cell refence that you need to change.
    'Use this macro after using Macro Copy Paste1,2....Correctnumber1,2
    Application.GoTo Cells(1, 1)
    For Each Rng In Sheets("Daily_Receipt").Range("A1:EG1")
    If IsNumeric(Rng) Then
    If Not IsDate(Rng) Then
    If Rng > 0 Or Rng < 0 Then
    Rng = Null
    End If
    End If
    End If
    Next Rng
    End Sub
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Run 3 macros with VB Code

    Hi HaHoBe:


    Please Login or Register  to view this content.

    Ok above are the 2 Macros.
    i need a macro to run 2 of the above macros with 1 command with 5 sec delay

    Let me know if any questions.

    Riz
    Last edited by rizmomin; 03-24-2013 at 01:05 PM.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Run 3 macros with VB Code

    Hi, Riz,

    substitute Macro1 with RsetValues and Macro2 with RsetFactor?

    Please Login or Register  to view this content.
    The range has been narrowed down to numbers as constants only.

    Ciao,
    Holger

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Run 3 macros with VB Code

    Hi HahoBe:

    Thank you so much...this will work for me.

    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1