Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Correct way to call function with 2 args...


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

-------------------

--
Phil_
-----------------------------------------------------------------------
Phil_V's Profile: http://www.excelforum.com/member.php...fo&userid=3185
View this thread: http://www.excelforum.com/showthread.php?threadid=52352

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Correct way to call function with 2 args...

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" schrieb im
Newsbeitrag ...

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:
--------------------
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

--------------------


--
Phil_V
------------------------------------------------------------------------
Phil_V's Profile:

http://www.excelforum.com/member.php...o&userid=31857
View this thread: http://www.excelforum.com/showthread...hreadid=523527



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
optional args in UDF masterphilch Excel Programming 4 March 3rd 06 12:23 PM
Correct way to call active worksheet? Locutis Excel Programming 4 May 2nd 05 06:17 PM
Over 29 args in a UDF with double parens Greg Lovern[_3_] Excel Programming 1 April 25th 05 09:46 PM
call a function from VBA Adam Excel Programming 2 March 15th 05 10:17 AM
call function sirron Excel Programming 1 August 26th 03 03:39 PM


All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"