Correct way to call function with 2 args...

P

Phil_V

ARGH!!!

Why does the following function call not work?
VBA keeps telling me that an "=" is expected?


Code
-------------------
Dim Ore_Name As String
Dim ws_index As Integer

Ore_Name = "Carbon"
ws_index = 3

Find_Ore_And_Setup_Grid(Ore_Name, ws_index) ' <=== This line will NOT compil
-------------------



Code
-------------------
Function Find_Ore_And_Setup_Grid(o_name As String, ws_index As Integer)
' Will search the indexed ws of the GPI_wb for the Ore name, if not found then it will be created with needed grid


End Function
 
J

Jörg

Hi Phil,

i think there´s missin a "call" like this:

Call Find_Ore_And_Setup_Grid(Ore_Name, ws_index)

If you add the "Call" i think it will work

Best regards
Jörg

Phil_V said:
ARGH!!!

Why does the following function call not work?
VBA keeps telling me that an "=" is expected?


Code:
--------------------
Dim Ore_Name As String
Dim ws_index As Integer

Ore_Name = "Carbon"
ws_index = 3

Find_Ore_And_Setup_Grid(Ore_Name, ws_index) ' <=== This line will NOT compile
--------------------



Code:
found then it will be created with needed grid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top