DG
Remove the () after Refresh_Query
Gord Dibben MS Excel MVP
On Wed, 21 Mar 2007 16:28:22 -0400, "DG" <(E-Mail Removed)> wrote:
>My spreadsheet has an ODBC query in it that pulls data from an SQL database.
>This has been placed in a macro named Refresh_Query() in Module1.
>
> I put a command button from the Control Toolbox and named it RefreshButton.
>Then double clicked the button to go into VB editor and in Shee1(Sheet1) it
>has a Private Sub RefreshButton_Click(). I put Refresh_Query() in here:
>
>Private Sub RefreshButton_Click()
> Refresh_Query()
>End Sub
>
>When I hit enter after typing Refresh_Query() I get an error: "Compile
>error: Expected: =".
>
>What does this mean? I know I've done this before. Do I need to declare
>something as global?
>
>Dan
>
|