[Solved] Linked message boxes

Keyboard macros or custom scripts

[Solved] Linked message boxes

Postby Tommi89 » Sun Dec 17, 2017 5:40 pm

Hi guys, i'm new here, I'm working on my first vba test project and i'm already stuck. Everything seems to work well until i try to close the last message box, where open office displays an error message about undefined function or subs. Can you help me? :knock:
thanks
Attachments
Icecreamtest.ods
(9.43 KiB) Downloaded 35 times
Last edited by Hagar Delest on Sun Dec 17, 2017 10:24 pm, edited 1 time in total.
Reason: tagged [Solved].
Open office 4.1 on Windows 10
Tommi89
 
Posts: 2
Joined: Sun Dec 17, 2017 5:20 pm

Re: Linked message boxes

Postby FJCC » Sun Dec 17, 2017 5:49 pm

This is not VBA but OpenOffice Basic. Try removing the Run from the beginning of your calls of Subs.
Code: Select all   Expand viewCollapse view
sub f1
Dim sVar as Integer
sVar = MsgBox("Do you like icecream?",35,"Icecream")
If sVar = 7 then
  f12
End if
If sVar = 6 then
  f11
End if

End Sub


sub f12
Dim sVar as Integer
sVar = MsgBox("i don't like you!",0,"Icecream test")
 
End Sub



sub f11
Dim sVar as Integer
sVar = MsgBox("Do you like it relly much?",35,"Icecream test")
If sVar = 7 then
  f112
End if
If sVar = 6 then
  f111
End if

End Sub


sub f111
Dim sVar as Integer
sVar = MsgBox("Good Boy!",0,"Icecream test")
 
End Sub

sub f112
Dim sVar as Integer
sVar = MsgBox("Ok Boy!",0,"Icecream test")
 
End Sub
AOO 3.4 or 4.1 on MS Windows XP ( before 2013-08-03) or Windows 7
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 6761
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Linked message boxes

Postby Tommi89 » Sun Dec 17, 2017 5:54 pm

That was easy. thank you very much, i lost nearly 2 hrs on that!!!! =)
Open office 4.1 on Windows 10
Tommi89
 
Posts: 2
Joined: Sun Dec 17, 2017 5:20 pm


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 3 guests