Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Problems with animating Assistant

Posted on 1997-12-16
5
267 Views
Last Modified: 2008-02-01
When Im trying to animate the Assistant in my code I have a line that says:

.Animation = msoAnimationGreeting

However, it says, "Error, Variable not defined"

What am I doing wrong???
0
Comment
Question by:threepio
  • 4
5 Comments
 
LVL 12

Accepted Solution

by:
Trygve earned 50 total points
ID: 1962706
It seems to me that microsoft has forgotten to declare the constants used in the example on how to animate the office assistants. I haven't been able to find the code anywhere.

Also be aware that all constants are not valid for all the assistants. Some of them can't do it all...


I have played around with the settings for the different Mso... constants: Here is my list. The constants I haven't
                   found any value for is set to 0. Try it if print msoAnimationGreeting in the debug window does not give a return
                   value.

                   Const msoAnimationAppear = 2
                   Const msoAnimationBeginSpeaking = 0
                   Const msoAnimationCharacterSuccessMajor = 6
                   Const msoAnimationCheckingSomething = 23
                   Const msoAnimationDisappear = 31
                   Const msoAnimationEmptyTrash = 116
                   Const msoAnimationGestureDown = 113
                   Const msoAnimationGestureLeft = 114
                   Const msoAnimationGestureRight = 19
                   Const msoAnimationGestureUp = 115
                   Const msoAnimationGetArtsy = 0
                   Const msoAnimationGetAttentionMajor = 0
                   Const msoAnimationGetAttentionMinor = 11
                   Const msoAnimationGetTechy = 0
                   Const msoAnimationGetWizardy = 26
                   Const msoAnimationGoodbye = 3 '?
                   Const msoAnimationGreeting = 0
                   Const msoAnimationIdle = 0
                   Const msoAnimationListensToComputer = 0
                   Const msoAnimationLookDown = 104
                   Const msoAnimationLookDownLeft = 105
                   Const msoAnimationLookDownRight = 106
                   Const msoAnimationLookLeft = 0
                   Const msoAnimationLookRight = 0
                   Const msoAnimationLookUp = 109
                   Const msoAnimationLookUpLeft = 110
                   Const msoAnimationLookUpRight = 111
                   Const msoAnimationPrinting = 0
                   Const msoAnimationSaving = 112
                   Const msoAnimationSearching = 103
                   Const msoAnimationSendingMail = 25
                   Const msoAnimationThinking = 0
                   Const msoAnimationWorkingAtSomething = 18 '?
                   Const msoAnimationWritingNotingSomething = 24 '?


                   Here is a little code I used for testing purposes:

                   With Assistant
                       .Reduced = False
                       .Move xLeft:=400, yTop:=300
                       .MoveWhenInTheWay = True
                       .Visible = True
                       .Animation = AssistantConstant
                   End With


Hope this helps!
Trygve
0
 

Author Comment

by:threepio
ID: 1962707
ok, so in your code where it says .Animation = AssistantConstant
I just insert the number?

And where do I declare them all?
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1962708
You could use the numbers, but your code will be more readable if you use the constants.

Copy the constants list and place it in the declaration part of some module or form (preferably a declaration module so that the are available for the entire base)

And then in your code.

.Animation = msoAnimationEmptyTrash  ' or some of the others.

My favourite; the above constant for the Einstein assistant.
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1962709
I have two icons on my desktop. They seem to be exact the same, uses the same installed Access, the same security file, but two different databases. In one of them, the constants are not defined and in the other I can use all the Access provided constants !!!

From the last one I have made an updated list of the constants. My first guess is left as a comment (just for fun). I will have a closer look on what makes the VBA constants not work and will come back to you if I figure it out.


Const msoAnimationAppear = 32 ' 2
Const msoAnimationBeginSpeaking = 4 ' 0
Const msoAnimationCharacterSuccessMajor = 6
Const msoAnimationCheckingSomething = 103 ' 23
Const msoAnimationDisappear = 31
Const msoAnimationEmptyTrash = 116
Const msoAnimationGestureDown = 113
Const msoAnimationGestureLeft = 114
Const msoAnimationGestureRight = 19
Const msoAnimationGestureUp = 115
Const msoAnimationGetArtsy = 100 ' 0
Const msoAnimationGetAttentionMajor = 11 ' 0
Const msoAnimationGetAttentionMinor = 12 '
Const msoAnimationGetTechy = 101 ' 0
Const msoAnimationGetWizardy = 102 ' 26
Const msoAnimationGoodbye = 3
Const msoAnimationGreeting = 2 ' 0
Const msoAnimationIdle = 1 ' 0
Const msoAnimationListensToComputer = 26 ' 0
Const msoAnimationLookDown = 104
Const msoAnimationLookDownLeft = 105
Const msoAnimationLookDownRight = 106
Const msoAnimationLookLeft = 107 ' 0
Const msoAnimationLookRight = 108 ' 0
Const msoAnimationLookUp = 109
Const msoAnimationLookUpLeft = 110
Const msoAnimationLookUpRight = 111
Const msoAnimationPrinting = 18 ' 0
Const msoAnimationSaving = 112
Const msoAnimationSearching = 13 ' 103
Const msoAnimationSendingMail = 25
Const msoAnimationThinking = 24 ' 0
Const msoAnimationWorkingAtSomething = 23 ' 18 '?
Const msoAnimationWritingNotingSomething = 22 ' 24 '?
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1962710
It turned out to work on both Icons after some testing, my mistake.

BUT: Earlier, when I posted my first answer, I were using a network installed Access'97. This version didn't have everything in it (among other things; the F2 - Zoom functionality didn't work). So perhaps a reinstallation of Access, making sure to include everything that sounds like VBA or Access Basic, would do the trick ?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question