Results 1 to 6 of 6

Using 1 macro to start another

Threaded View

  1. #1
    Registered User
    Join Date
    12-15-2008
    Location
    Johannesburg
    Posts
    23

    Using 1 macro to start another

    Hi

    I have a macro, at the end of which I'd like it to jump to a second macro OR incorporate the second macro into the 1st. I've tried combining them in several different ways, but get an error 13 every time. So, basically, if I can't combine them into 1 macro, then perhaps I can get the 1st to automatically start the second.

    Iether way, even if somebody here can combine the 2 into 1, could please still show me how to get one macro start another (for educational purposes)

    The 1st code is based on a previous solution (for a different problem!) I received from this forum

    Here is the 1st code:

    Sub Backwash_Click()
    '
    '
    Dim sec As Integer
        sec = range("A2")
    Dim step_no As Double
    For step_no = 3.1 To 3.91 Step 0.1
        Sheets("Sheet1").range("A1") = step_no
        Application.Wait Now + TimeSerial(0, 0, sec)
    If range("A1").Value = "3.9" Then
    Dim step_no1 As Double
    For step_no1 = 4.1 To 4.8 Step 0.1
        Sheets("Sheet1").range("A1") = step_no1
        Application.Wait Now + TimeSerial(0, 0, sec)
    Next step_no1
    End If
    Next step_no
    End Sub
    here is the 2nd code:

    Sub One()
    if range("A1").value = 4.8 then
    ActiveCell.FormulaR1C1 = "2.3"
    End if
    End Sub
    Thanks
    Last edited by Riley_5000; 01-19-2009 at 06:59 AM.

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