Draft Variable table linked to .bas

 

Hi all

Does anyone have any example of how to link a .bas file to a variable table function?

all i get is errors

my .bas file is this simple (Just testing the waters and i know this can be done from the table it's self)

Public Sub GetSheetCount(ByRef SheetCount As Integer)

SheetCount = SheetCount + 100

End Sub

Basically pass a number in to it and add 100 to it , How do you link the argument and pass a number into it?

Cheers Snow

 

Posted by: Snow Mackenzie
Post date: 9/17/2008 1:16:53 PM

1 REPLY

RE: Draft Variable table linked to .bas

Posted By Snow Mackenzie on 09/17/2008 6:16 PM

 

Hi all

Does anyone have any example of how to link a .bas file to a variable table function?

all i get is errors

my .bas file is this simple (Just testing the waters and i know this can be done from the table it's self)

Public Sub GetSheetCount(ByRef SheetCount As Integer)

SheetCount = SheetCount + 100

End Sub

Basically pass a number in to it and add 100 to it , How do you link the argument and pass a number into it?

Cheers Snow

Snow,

I believe you simply need to make it a Function rather than a Sub.  The following example works for me.

 Public Function MMtoM(MillimeterValue As Double) As Double MMtoM = MillimeterValue / 1000End Function'Returns a number converted from meters to millimetersPublic Function MtoMM(MeterValue As Double) As Double MtoMM = MeterValue * 1000End Function

 

Posted by: Jason Newell
Post date: 9/21/2008 7:37:39 PM