+ Reply to Thread
Results 1 to 2 of 2

Calling subroutines and passing variables

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Posts
    164

    Calling subroutines and passing variables

    hi,

    I have the following code:
    Please Login or Register  to view this content.
    but it has a problem with the line:
    Please Login or Register  to view this content.
    as it displays an error saying "Compile Error Expected: ="

    does anyone know what i'm doing wrong?
    i'm sure i've passed two variables into another subroutine before...

    thanks in advance,
    Matt

  2. #2
    Tom Ogilvy
    Guest

    RE: Calling subroutines and passing variables

    Try

    Call Send_Unformatted_Rangedata (a_variable, tofield)

    or

    Send_Unformatted_Rangedata a_variable, tofield

    --
    Regards,
    Tom Ogilvy



    "matpj" wrote:

    >
    > hi,
    >
    > I have the following code:
    >
    > Code:
    > --------------------
    >
    > Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    > If Target.TextToDisplay = "CPO Reports" Then
    > a_variable = ActiveCell.Offset(ColumnOffset:=-3).Value
    > tofield = ActiveCell.Offset(ColumnOffset:=-5).Value
    >
    > Select Case MsgBox("Email CPO?", vbQuestion + vbYesNo, "Confirm")
    > Case vbYes: Send_Unformatted_Rangedata (a_variable, tofield)
    >
    > Case Else: Exit Sub
    > End Select
    >
    >
    >
    > End If
    >
    > End Sub
    > --------------------
    >
    >
    > but it has a problem with the line:
    >
    > Code:
    > --------------------
    > Send_Unformatted_Rangedata (a_variable, tofield)
    >
    > --------------------
    >
    >
    > as it displays an error saying "Compile Error Expected: ="
    >
    > does anyone know what i'm doing wrong?
    > i'm sure i've passed two variables into another subroutine before...
    >
    > thanks in advance,
    > Matt
    >
    >
    > --
    > matpj
    > ------------------------------------------------------------------------
    > matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
    > View this thread: http://www.excelforum.com/showthread...hreadid=527607
    >
    >


+ 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