I am testing some functions at the moment (I wrote them a few years
ago and now I'm trying to make them faster…) but I am a bit stuck at
the moment.

It looks something like this:

' Code starts here
Option Explicit

Type Blahblah
        This As Integer
        That As Integer
End Type

Dim OneThing As Blahblah
Dim MoreStuff As Integer

Sub Main
        Dim X As Integer
        Some stuff
        More stuff
End Sub
' End of code

' Code starts here
Function MyFunction(A As Integer) As Integer
        Dim SomeValue As Integer
        Some stuff
        More stuff
End Function
' End of code

Now, when running this (with F5 or F8), it seems like it starts at
”Sub Main” and everything above it is omitted, so I get an error
message in module2 when ”OneThing” is mentioned.
Shouldn't the global things be available in all modules? They are if I
run similar macros from a spreadsheet, for example, that is not from
the Basic IDE.

Did I miss something here? Is there a way around it?

Kind regards

Johnny Rosenberg
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help

Reply via email to