vba and animations

Hi,

I am using VBA in PowerPoint 2003.
I'm new to VBA and I find that looking for informations about animation is 
quite difficult. When I want to know what informations to give when I want to 
insert a shape, it's quite easy because I can record a macro and then use 
this information. Unfortunately, it's not possible for animation. Do you know 
of any good tutorial about this ? For example, I would like to know how to 
lenghten the path if I'm using msoAnimEffectPathRight or how to include a 
sound with it.

On another subject, there is still no answer to my question here and I 
haven't found an answer by myself :

http://www.microsoft.com/office/community/en-us/default.mspx?pg=3&cat=&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.powerpoint&fltr=

Thank you for your help. It is very appreciated.

Christine./
Exemple of code I am using, exploring userform and animations :

Private Sub CheckBox1_Click()
    etoile = True
End Sub

Private Sub CheckBox2_Click()
    carre = True
End Sub

Private Sub CheckBox3_Click()
    cercle = True
End Sub

Private Sub CommandButton1_Click()
    Me.hide
    If etoile = True Then
        Set formeEtoile = 
ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShape5pointStar, 67.75, 60.12, 97.38, 84.75)
        With formeEtoile
        .Fill.ForeColor.RGB = RGB(255, 255, 0)
        .Line.Weight = 4#
        .Line.ForeColor.RGB = RGB(255, 102, 0)
        .Line.BackColor.RGB = RGB(255, 255, 255)
    End With
    End If
    If carre = True Then
        Set formeCarre = 
ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeRectangle, 67.75, 191.38, 88.88, 78)
        With formeCarre
        .Fill.ForeColor.SchemeColor = ppAccent2
        .Fill.Transparency = 0#
        .Line.Weight = 4#
        .Line.ForeColor.RGB = RGB(128, 128, 128)
        .Line.BackColor.RGB = RGB(255, 255, 255)
    End With
    End If
    If cercle = True Then
        Set formeCercle = 
ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeOval, 
67.75, 401.5, 122.75, 122.75)
        With formeCercle
        .Fill.ForeColor.RGB = RGB(255, 0, 255)
        .Line.Weight = 4#
        .Line.ForeColor.RGB = RGB(153, 204, 0)
        .Line.BackColor.RGB = RGB(255, 255, 255)
    End With
    End If
    If etoile = True And trajet = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectPathRight)
            .Timing.SmoothEnd = False
            .Timing.SmoothStart = False
            .Timing.Speed = 1
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
    If etoile = True And emphase = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectSpin)
            .Timing.Duration = 2
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
    If carre = True And trajet = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectPathRight)
            .Timing.SmoothEnd = False
            .Timing.SmoothStart = False
            .Timing.Speed = 1
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
    If carre = True And emphase = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectFlicker)
            .Timing.Duration = 2
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
    If cercle = True And trajet = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectPathRight)
            .Timing.SmoothEnd = False
            .Timing.SmoothStart = False
            .Timing.Speed = 1
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
    If cercle = True And emphase = True Then
        With 
ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectWave)
            .Timing.Duration = 2
            .Timing.TriggerType = msoAnimTriggerAfterPrevious
            .Timing.TriggerDelayTime = 1
        End With
    End If
End Sub

Private Sub OptionButton1_Click()
    trajet = True
End Sub

Private Sub OptionButton2_Click()
    emphase = True
End Sub



0
Utf
6/4/2010 4:14:11 PM
powerpoint 2011 articles. 0 followers. Follow

2 Replies
7397 Views

Similar Articles

[PageSpeed] 43

Unfortunately, there is not much available on this topic. I think the 
most you are going to find is on Shyam's site:

http://skp.mvps.org/ppttimeline1.htm

I didn't discuss animations in my book about PowerPoint and VBA.

--David

-- 
David M. Marcovitz
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/


On 6/4/10 12:14 PM, Christine Fournier wrote:
> Hi,
>
> I am using VBA in PowerPoint 2003.
> I'm new to VBA and I find that looking for informations about animation is
> quite difficult. When I want to know what informations to give when I want to
> insert a shape, it's quite easy because I can record a macro and then use
> this information. Unfortunately, it's not possible for animation. Do you know
> of any good tutorial about this ? For example, I would like to know how to
> lenghten the path if I'm using msoAnimEffectPathRight or how to include a
> sound with it.
>
> On another subject, there is still no answer to my question here and I
> haven't found an answer by myself :
>
> http://www.microsoft.com/office/community/en-us/default.mspx?pg=3&cat=&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.powerpoint&fltr=
>
> Thank you for your help. It is very appreciated.
>
> Christine./
> Exemple of code I am using, exploring userform and animations :
>
> Private Sub CheckBox1_Click()
>      etoile = True
> End Sub
>
> Private Sub CheckBox2_Click()
>      carre = True
> End Sub
>
> Private Sub CheckBox3_Click()
>      cercle = True
> End Sub
>
> Private Sub CommandButton1_Click()
>      Me.hide
>      If etoile = True Then
>          Set formeEtoile =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShape5pointStar, 67.75, 60.12, 97.38, 84.75)
>          With formeEtoile
>          .Fill.ForeColor.RGB = RGB(255, 255, 0)
>          .Line.Weight = 4#
>          .Line.ForeColor.RGB = RGB(255, 102, 0)
>          .Line.BackColor.RGB = RGB(255, 255, 255)
>      End With
>      End If
>      If carre = True Then
>          Set formeCarre =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeRectangle, 67.75, 191.38, 88.88, 78)
>          With formeCarre
>          .Fill.ForeColor.SchemeColor = ppAccent2
>          .Fill.Transparency = 0#
>          .Line.Weight = 4#
>          .Line.ForeColor.RGB = RGB(128, 128, 128)
>          .Line.BackColor.RGB = RGB(255, 255, 255)
>      End With
>      End If
>      If cercle = True Then
>          Set formeCercle =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeOval,
> 67.75, 401.5, 122.75, 122.75)
>          With formeCercle
>          .Fill.ForeColor.RGB = RGB(255, 0, 255)
>          .Line.Weight = 4#
>          .Line.ForeColor.RGB = RGB(153, 204, 0)
>          .Line.BackColor.RGB = RGB(255, 255, 255)
>      End With
>      End If
>      If etoile = True And trajet = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectPathRight)
>              .Timing.SmoothEnd = False
>              .Timing.SmoothStart = False
>              .Timing.Speed = 1
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
>      If etoile = True And emphase = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectSpin)
>              .Timing.Duration = 2
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
>      If carre = True And trajet = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectPathRight)
>              .Timing.SmoothEnd = False
>              .Timing.SmoothStart = False
>              .Timing.Speed = 1
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
>      If carre = True And emphase = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectFlicker)
>              .Timing.Duration = 2
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
>      If cercle = True And trajet = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectPathRight)
>              .Timing.SmoothEnd = False
>              .Timing.SmoothStart = False
>              .Timing.Speed = 1
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
>      If cercle = True And emphase = True Then
>          With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectWave)
>              .Timing.Duration = 2
>              .Timing.TriggerType = msoAnimTriggerAfterPrevious
>              .Timing.TriggerDelayTime = 1
>          End With
>      End If
> End Sub
>
> Private Sub OptionButton1_Click()
>      trajet = True
> End Sub
>
> Private Sub OptionButton2_Click()
>      emphase = True
> End Sub
>
>
>

-1
David
6/4/2010 6:08:58 PM
Christine,
You can change the length of the motion path animation by editing the VML 
information of the motion. Take a look at the string returned by the Path 
property and parse the information from there.
You can read more about VML. Basically the motion string is a set of space 
delimited coordinates representing lines or bezier curves. The dimensions 
are relative to the size of the slide.

Sub AddMotionPath()

   Dim shpNew As Shape
   Dim effNew As Effect
   Dim aniMotion As AnimationBehavior

   Set shpNew = ActivePresentation.Slides(1).Shapes _
       .AddShape(Type:=msoShape5pointStar, Left:=0, _
       Top:=0, Width:=100, Height:=100)
   Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _
       .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom, _
       Trigger:=msoAnimTriggerWithPrevious)
   Set aniMotion = effNew.Behaviors.Add(msoAnimTypeMotion)

   With aniMotion.MotionEffect
      .Path = "M 0 0  L -0.25 0  E"
   End With

End Sub

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm


> Hi there,


Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.com


"Christine Fournier" <ChristineFournier@discussions.microsoft.com> wrote in 
message news:BDFBC628-FA5A-40A6-9167-F3A42BF3AF5D@microsoft.com...
> Hi,
>
> I am using VBA in PowerPoint 2003.
> I'm new to VBA and I find that looking for informations about animation is
> quite difficult. When I want to know what informations to give when I want 
> to
> insert a shape, it's quite easy because I can record a macro and then use
> this information. Unfortunately, it's not possible for animation. Do you 
> know
> of any good tutorial about this ? For example, I would like to know how to
> lenghten the path if I'm using msoAnimEffectPathRight or how to include a
> sound with it.
>
> On another subject, there is still no answer to my question here and I
> haven't found an answer by myself :
>
> http://www.microsoft.com/office/community/en-us/default.mspx?pg=3&cat=&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.powerpoint&fltr=
>
> Thank you for your help. It is very appreciated.
>
> Christine./
> Exemple of code I am using, exploring userform and animations :
>
> Private Sub CheckBox1_Click()
>    etoile = True
> End Sub
>
> Private Sub CheckBox2_Click()
>    carre = True
> End Sub
>
> Private Sub CheckBox3_Click()
>    cercle = True
> End Sub
>
> Private Sub CommandButton1_Click()
>    Me.hide
>    If etoile = True Then
>        Set formeEtoile =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShape5pointStar, 
> 67.75, 60.12, 97.38, 84.75)
>        With formeEtoile
>        .Fill.ForeColor.RGB = RGB(255, 255, 0)
>        .Line.Weight = 4#
>        .Line.ForeColor.RGB = RGB(255, 102, 0)
>        .Line.BackColor.RGB = RGB(255, 255, 255)
>    End With
>    End If
>    If carre = True Then
>        Set formeCarre =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeRectangle, 
> 67.75, 191.38, 88.88, 78)
>        With formeCarre
>        .Fill.ForeColor.SchemeColor = ppAccent2
>        .Fill.Transparency = 0#
>        .Line.Weight = 4#
>        .Line.ForeColor.RGB = RGB(128, 128, 128)
>        .Line.BackColor.RGB = RGB(255, 255, 255)
>    End With
>    End If
>    If cercle = True Then
>        Set formeCercle =
> ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape(msoShapeOval,
> 67.75, 401.5, 122.75, 122.75)
>        With formeCercle
>        .Fill.ForeColor.RGB = RGB(255, 0, 255)
>        .Line.Weight = 4#
>        .Line.ForeColor.RGB = RGB(153, 204, 0)
>        .Line.BackColor.RGB = RGB(255, 255, 255)
>    End With
>    End If
>    If etoile = True And trajet = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, 
> effectid:=msoAnimEffectPathRight)
>            .Timing.SmoothEnd = False
>            .Timing.SmoothStart = False
>            .Timing.Speed = 1
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
>    If etoile = True And emphase = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeEtoile, 
> effectid:=msoAnimEffectSpin)
>            .Timing.Duration = 2
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
>    If carre = True And trajet = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, 
> effectid:=msoAnimEffectPathRight)
>            .Timing.SmoothEnd = False
>            .Timing.SmoothStart = False
>            .Timing.Speed = 1
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
>    If carre = True And emphase = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCarre, 
> effectid:=msoAnimEffectFlicker)
>            .Timing.Duration = 2
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
>    If cercle = True And trajet = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, 
> effectid:=msoAnimEffectPathRight)
>            .Timing.SmoothEnd = False
>            .Timing.SmoothStart = False
>            .Timing.Speed = 1
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
>    If cercle = True And emphase = True Then
>        With
> ActivePresentation.SlideShowWindow.View.Slide.TimeLine.MainSequence.AddEffect(Shape:=formeCercle, 
> effectid:=msoAnimEffectWave)
>            .Timing.Duration = 2
>            .Timing.TriggerType = msoAnimTriggerAfterPrevious
>            .Timing.TriggerDelayTime = 1
>        End With
>    End If
> End Sub
>
> Private Sub OptionButton1_Click()
>    trajet = True
> End Sub
>
> Private Sub OptionButton2_Click()
>    emphase = True
> End Sub
>
>
> 
0
Shyam
6/5/2010 5:56:54 PM
Reply:

Similar Artilces:

Changing Multiple Tab Colors based on lookup value VBA?????
I am very new to VBA and am looking for help with the following problem: My workbook contains ten tabs that link back to a central sheet. I would like the color of each tab to change (Green vs No Color) based on whether a certain cell in each tab meets a certain requirement. Example: If cell (V1) in tabs 1, 2 & 5 = "Yes" then color the tab green else no color. Note, (V1) is a lookup function that gives a value from the central sheet. The remaining tabs (3, 6,7,8,9 & 10) would have no color since the lookup function is not equal to "Yes". Note, the central ...

Modifier with VBA`
Our company is recently trying to do some changes on the Collection mgmt windows. Its being suggested we go tthrough via the Modifier approach. We are using GP 8.0; so we installed the VBA from the additional product suite but when I go to Tools->Customize I find the VBA menu items disabled. So going through this newsgroup it was suggested that an additional license[site customization license ] is required . Is this true? AC AC: If you are a customer and want to do your own VBA modifications, you must buy the full Modifier with VBA product. If you are a partner who is doing the ...

vba project password
Hello I created a form about 2 years ago and I put a password in the vba project. Today I was asked to make a change and I cannot remember the password. Is there any way to do this? Please I hope so.... thanks Try searching for "free excel vba password open source download" on Google. -- Rich Locus Logicwurks, LLC "Wanna Learn" wrote: > Hello I created a form about 2 years ago and I put a password in the vba > project. Today I was asked to make a change and I cannot remember the > password. Is there any way to do this? Ple...

running some VBA code in response to data entered in a cell
hello again Can anyone tell me if it is possible to trigger some VBA code when a number entered in a particular cell on a worksheet is less than the number in another cell?. I dont know if cells have events linked to them such as mouse down etc Thanks Ian Mantrid You could use the worksheet_change event like so. Checks a value in A1 and if below 10 it colours B1 red Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1")) Is Nothing Then If Target.Value < 10 Then Target.Offset(0, 1).Interior.Color = RGB(255, 0, 0) ...

VBA on Citrix
Our remote user are accessing GP via Citrix (on Windows 2003 server) and we also use VBA to add custom form. Remote user are grouped as 'gp users' and I had grant Full Control right 'gp users' on following registry: * HKEY_LOCAL_MACHINE- Software- Microsoft- Great Plains * HKEY_LOCAL_MACHINE- Software-Microsoft-Office * HKEY_LOCAL_MACHINE- Software-Class-CLSID * HKEY_CLASSES_ROOT-CLSID * HKEY_CLASSES_ROOT-Interface * HKEY_CLASSES_ROOT-TypeLib everything work fine until recently I added a form that uses MSFLXGRD.OCX which I had properly registered the ocx. When remote use...

help with VBA retrieveglobals9
can anyone help me with using this dll, I cannot find any documentation anywhere as to how to construct a connection sting using this? MAny thanks for any help RetrieveGlobals9 was updated to work with the new login handling for v9.0. It no longer returns a connection string, it now returns the connection itself. Please use the links at the bottom of this KB Article to download the dll and the documentation. https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;913341 David Musgrave [MSFT] Senior Development Consultant Escalation Engineer - Great Plains Microsoft Dynam...

VBA Question #7
I have a little problem. I need to write a VBA. I have a button that will print four letters that are located in a seperate worksheet. Currently I have a macro that goes to that worksheet and prints all four. But I want to have a pop-up that will ask Which letter they want to print. I believe that this is possible, but i need some help developing it. Any help would be appreciated. Thank you One way would be to record 4 different macros - one to print each letter, in my example I have called them Print1, Print2, etc. Then attach the macro below to your print button: Sub Pintit(...

EOF in Excel VBA
Hi Everyone, I have recorded a macro that will pivot some data. Each month I get a fresh batch of data that needs to be pivoted in the same way. Each month though the amount of records increases, although the format stays the same, so at the moment I go into the VBA code and change the number of rows that excel with pivot tom allow for the new number of records. Is it possible to uise some code code to tell excel to look untill there are no more records to know how much data to pivot. I don't know a great deal about VBA just stuff I've picked up along the way so I won't ...

VBA Question
I have written a VBA Panel with one of the buttons being a page upand page down button using the following code Private Sub CommandButton26_Click() On Error Resume Next With ActiveWindow.View Call .GotoSlide(.Slide.SlideIndex + 1) End With End Sub The code works in the slide view but not the slide master view. What am I missing? What would you expect it to do in Master view? (There are no slides to goto in this view) -- john ATSIGN PPTAlchemy.co.uk Free PPT Hints, Tips and Tutorials http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_...

VBA
What does the acronym VBA stand for? I cannot find it in Excel's help menu. --- Message posted from http://www.ExcelForum.com/ Visual Basic for Applications "1NCaNon" <1NCaNon.zb64y@excelforum-nospam.com> wrote in message news:1NCaNon.zb64y@excelforum-nospam.com... > What does the acronym VBA stand for? I cannot find it in Excel's help > menu. > > > --- > Message posted from http://www.ExcelForum.com/ > ...

chart area size vba
How can I set the chart size of an existing active/selected chart? I tried this withing a sub routine: With ActiveChart.ChartArea .Width = 5 .Height = 3 End With And get the error message: Unable to Set the Width Property of the ChartArea Class Any help is appreciated. Hi, If the chart is on a worksheet this will work, although your chart will be very small. With ActiveChart.Parent .Width = 5 .Height = 3 End With Cheers Andy kaonashi@gmail.com wrote: > How can I set the chart size of an existing active/selected chart? > > I tried this withing a sub routi...

VBA #2
trying to get code to pick up null values in lines i'm copying from a coupole of worksheets and pasting and move the existing counter i have to the next line that contains data before i write it to another worksheet What code do you have now, and what problem are you having? spota wrote: > trying to get code to pick up null values in lines i'm copying from a > coupole of worksheets and pasting and move the existing counter i have to > the next line that contains data before i write it to another worksheet > -- Debra Dalgleish Excel FAQ, Tips & Book List http://...

VBA Doorway to Database Properties
How do I access the data in the Database Properties window from VBA? I have searched the help files and numerous properties via the Immediate Window, but cannot find an opening to the underlying Database Properties in the object model. I can access the ShapeSheet, but that has no info on the relationship itself. I can get the field list via .Text in the individual Entities, but not the table name. Where is all that stuff found? (I suspect it might be through the UI, but I've had no luck there, either.) My diagram is a reverse-engineered Access 2003 database, with over 280 relations...

Convert to VBA code?
I originally had a button that, when clicked, would run a macro. I now need to write the VBA code for that instead, and need help. Here's what I am trying to accomplish: My form contains a field called TimeStop which contains Date/Time in the format of 3/22/10 10:05:06 AM I need to populate a field called DateStop and the value of that field will depend on the TIME portion of TimeStop. If TimeStop is between 12:00:00 AM (midnight) and 5:00:00 AM, then I need DateStop to be the current date - 1. Otherwise, I need it to be the current date. Here's my stab at it, but I ...

VBA conundrum
Ok, so here's the problem... I prompt the user to enter a size (say 9,000), then I subject that number to a condition. If size >=0<10,000 Then This is where I get confused. First, I would like to determine whether 9,000 is in the range that I've specified. Ok, so it is. Second, I want to take the user's number (9,000) and determine how many times a default number for that range (3,500) goes into 9,000. 3,500 goes into 9,000 twice so numbers "1" and "2" would comprise column 1. Third, I want to display the default number, 3,500, in a second col...

Error on simple VBA code
I am trying to set the post to GL flag as checked on inventory batch window. The code is very simple: Private Sub BatchID_Changed() Me.PosttoGeneralLedger = 1 End Sub I tried this same code with different events but the error is the same. The error I am getting is Run time error 1007. Unsafe operation. An attempt was made to set a value which violates the application's business logic. What could be the issue here and how can I resolve it. Thank you. KT: The problem here is that a bunch of nested code runs behind the BATCHID button change event. I scripted it so you can see: *****...

Possible VBA help needed
Hey guys, i'm new here and need some Excel help. Using Office 2003. I've got a long list of names (we'lll call it List A) with separate columns for various data like SSN and geographic location, etc. I've got another list (List B) of names which I'm trying to compare it to. Ultimately I want to come up with one MERGED final list but obviously I want to avoid having any duplicate entries. The problem is further excerbated by List A being sorted in alphabetical order by last name, first name. List B is sorted by first name, last name. This obviously makes the compari...

update details using vba
Hi I have a validation list over 2 cells which when a specific word is selected from the list then I need the word 'Please specify:' to be shown in another cell but when any other word is selected from the list is is empty then I dont want the 'Please specify:' to be visible. Can anyone help. I have tried the following but does not work and I dont know why. Private Sub Worksheet_selectionChange(ByVal Target As Range) If Target.Address = "G26" Then If Range("G26").Value = "Other" Then Range("E28").Value = "P...

from vba to vsto
Hi Im trying to convert my vba code to vb.net and have a problem. I have a function that returns the default file path for the usertemplates, another one for the workgrouptemplates. I need to know both because I want to create documents based on templates that are placed in theese diredtions. vba getTemplateFilePath = Application.Options.DefaultFilePath(wdUserTemplatesPath) & "\" I have found the Globals.ThisAddIn.Application.Options.DefaultFilePath but I dont understand how I can specify to make it return the usertemplatesPath? does anyone know? It's ve...

Search function in VBA
I need help setting up a search function in VB - basically it would ru like this: The user presses the "Search" button, which brings up a dialogue bo that they input their information into. They press "Ok" and the searc macro finds the info they need. Any help would be appreciated! Thanks -- Message posted from http://www.ExcelForum.com Hi and why not use the build-in dialog? -- Regards Frank Kabel Frankfurt, Germany > I need help setting up a search function in VB - basically it would > run like this: > The user presses the "Search" button, which...

Print dialog box using VBA in excel
Hi Everyone, I like to add a print button (that will select several worksheets and print them) in my excel worksheet. I have recorded my action using the macro recorder the problem is I can't select the printer everytime I run the macro it print in the background without asking the user to select the printer and uses the default printer. Can anyone help?? I just want the user to be able to select the desired printer every time before printing. My current code: Sub Print_All() Sheets(Array("Sheet 1", "Sheet 2", "Sheet 3", "Sheet 5)).Select 'intent...

java message with VBA
You can import www site with Excel, but only those parts which writes in HTML. Java applet seems to disappear. Is there any possibility to intercept the java message (text) with VBA <SCRIPT LANGUAGE="JavaScript"> function choiceCheck() { var nrTable=new Array("119b/05",-1); var timeTable=new Array("07:16","09:50",-1); var dateTable=new Array("23-06-2005","23-06-2005",-1); � so on This part of data will not appear Any suggestion Thanks Don't see how, as that is an instruction to HTTP to run that c...

vba
Hi, How can I populate the Trx Dimension Code Description in Analytical Payables Trasnaction Entry window using vba? I have put the correct value in the Trx Dimension Code but after running IM the Trx Dimension Code Description is not updated. I need to go the grid, press tab before it will display the value. Is there a way to manipulate it using vba? Thanks, Mel Hi Mel Analytical Accounting and Integration Manager standard adapters don't play well together. have a look at this post for more info. http://blogs.msdn.com/b/developingfordynamicsgp/archive/2009/09/0...

VBA + Excel Performance: your feedback requested
Hello all - The Excel development team is currently investigating a number of scenarios where VBA macros take longer to run in Excel 2007 than in earlier versions (i.e. Excel 2003). I am looking for folks who believe they have run into a VBA performance slowdown and who would be willing to share their code/workbook/steps to reproduce the issue. Given the enormous variety of solutions people build in Excel using VBA, we feel it is important to survey the XL community to collect a range of examples that are important to XL users. Specifically, we are looking for VBA code that takes long...

Turn off Outlook spell checking of messages with vba
In developing an application for Word which sends e-mail messages using Outlook, I came across an issue that I have not been able to resolve. Hopefully someone will have a plan :) With Outlook's options configured to spell check the message before sending, each message processed creates the message 'Word finished checking the selection. Do you want to continue the remainder of the document' which requires user intervention. Clearly if the option is switched off in Outlook, the message doesn't occur. As I have no control over whether users have this option set o...