Link to home
Start Free TrialLog in
Avatar of threepio
threepio

asked on

Problems with animating Assistant

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???
ASKER CERTIFIED SOLUTION
Avatar of Trygve
Trygve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of threepio
threepio

ASKER

ok, so in your code where it says .Animation = AssistantConstant
I just insert the number?

And where do I declare them all?
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.
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 '?
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 ?