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
7625 Views

Similar Articles

[PageSpeed] 3

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:

Master .dic and .vba files
In GP7.5 I have 20 or 30 users that should have the same .dic and .vba files and access to forms/reports are controlled by security. Will I run into problems if I maintain a "master" of these files and when a form or report changes simply push the master .dic and .vba files back to the individual desktops? Thanks I've done this by storing the master copies of the files on a network share and placing a .bat file in the startup folder on each client to copy these files down to their local drives. ...

MVP's?? Why is Excel 97 VBA much faster than Excel 2002 VBA
Hi I don't know if anyone knows why, but it seems that Excel 97 runs for next loops at about 25 times faster than Excel 2002. In Dec 2002, I created a workbook using the code attributed originally to Bob McCormick to break worksheet passwords and later modified by Norman Harker to break workbook passwords that automatically looped through a workbook and unprotected the workbook and all sheets with the same or different passwords. I incorperated a rough timer into it so it showed at the end approximately how long it took to unprotect the wb and all sheets. Using Excel 97, it consistently...

Help with Report Write and VBA
Two things I am trying to do. First I am trying to access fields in unrelated tables in a report. I know this can be done but I do not know where to start. Second I am creating a new UserForm window. When that window is filled out, the user click "Save" and the info on the windows goes to a custom (I made) table. Do I really need to know where the UserForm1 is saved or do I need to push the info out??? Any help would be much appreciated. Thank you, Robert G. Hi Robert I have a VBA example of how to get data from other tables using VBA, RetrieveGlobals, ADO and ...

Lookup VBA
I have a workbook with 2 sheets. I am looking for a short procedure that detects if there, in sheet 2, is any occupied cell in column K (K4 and down) with no data in the cell to the right (column I). Then a message should pop up saying: "Please update the sheet". Any suggestions? Sub FindMissing() Dim k As Long, i As Long With Sheets("Sheet2") k = Cells(Rows.Count, "K").End(xlUp).Row For i = 4 To k If Cells(i, "K").Value <> "" And Cells(i, "I").Value = "" Then MsgBox "Please update the ...

Additional VBA controls?
When I open the 'additional controls' dialog I see a bunch of controls apparently placed there when various applications were installed. Does their presence in the 'available controls' list really mean that they can be used or is it just a side effect of installing the program? More specifically, there is a Quicken class. I've tried to use it and every time it causes Excel to crash. -- Thanks, Jeff Jeff, A controls presence in the list means only that it has been registered with Windows and can be used under certain circumstances in certain types of programs. It do...

Excel VBA: Dropdown Box and Image Color Change
I have drop down boxes (with values of red, blue, and yellow) and after I select a color - I would like the drop down box color to feed into an image (T-shirt) so that is is changed the color of the shirt is changed. For my image, I am using an embedded Flash Movie. I don't know if this is capable - any creative ideas are welcome. --- Message posted from http://www.ExcelForum.com/ ...

VBA code to go to a bookmarked drop down goes to wrong drop down
I am using vba code to perfprm a variety of tasks; the code is working fine, except, the last action before re protecting the form is to go to a specific bookmarked drop down 'byelaw1' but it goes to 'byelaw2' instead: Sub Onexitclassification() If ActiveDocument.FormFields("pclassificationDD").Result = "CASB(B)/ Offences against park byelaws" Then ActiveDocument.FormFields("Classificationtext").Result = "(In accordance with the LBS 'Byelaws for Pleasure Grounds, Public Walks and Open Spaces' November 2008)" ActiveDocument.Unp...

Open a program and program file from Access VBA
OK. First off, I am wanting to know if this can even be DONE :) I am wanting to program a command button on a form to open another application and then run a file pertaining to that application based on the "part number" value in a field on a form. I know that command buttons can be programmed to open applications using the command button wizard. However, (an this is just my train of thought), can VBA take the value from the part number field, then look into a specified folder (or two) and find the file to open? Any help on this is most appreciated. Thanks :) Yes, VBA can tak...

Formatting footer in VBA code
Hi all.... I have this bit of code in a macro that I would like formatted, but I do not know how....the code is to automatically insert the file path and the tab name of a spreadheet....I would like to format the code, so that every time it opens a document it will make the font Arial size 8. What I have now only makes the "&A" (which is the tab) size 8...... Here is the string.... .CenterFooter = ActiveWorkbook.FullName & Chr(10) & "&""Arial""&8&A" Any suggestions would be great!!!!!!!!!!!! I'm not sure I foll...

VBA
Ok, all you expert Excel users may think this is dumb.....but what is VBA? And what do you use it for? I looked around and can't figure a thing out. -- Kim Hi Visual Basic for applications. Used to write macros/programs. As a starting point: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "Kim" <Kim@discussions.microsoft.com> schrieb im Newsbeitrag news:FD4D63BE-2703-4988-B146-8C273849E313@microsoft.com... > Ok, all you expert Excel users may think this is dumb.....but what is VBA? > And what do you use it for? ...

Copy and Paste using VBA.
Hi, If A1 is not blank then Copy A1 and Paste in A2:A7. I originally had simple links in cells A2:A7 that connected to A1. But sometimes one of the cells in range A2:A7 may manually have a value typed in them, which erases the link to A1. I thought trying this using VBA would eliminate the cell linkage loss. I'm new to VBA. Any suggestions would be appreciated. Amy Right-click the tab for the sheet where you want this to apply, select "View Code", then paste in the code below. If you really want it to behave the same as a link, then I'd take out ...

Clipboard acces via VBA
How do I clear the clipboard using VBA in Excell -- Message posted from http://www.ExcelForum.com Try code like Application.CutCopyMode = False -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Wimpie >" <<Wimpie.142z3u@excelforum-nospam.com> wrote in message news:Wimpie.142z3u@excelforum-nospam.com... > How do I clear the clipboard using VBA in Excell? > > > --- > Message posted from http://www.ExcelForum.com/ > application.cutcopymode=false -- HTH Bob Phillips ... looking out across...

excel vba
I have this formula in cell K47, but it comes up as #VALUE, what i missing =IF(H15="some name",SUM(K42:K44)+K46),IF(H15<>"anothe name",SUM(K42:KK46)) any idea -- Message posted from http://www.ExcelForum.com Hi how about =IF(H15="some name",SUM(K42:K44,K46),IF(H15<>"another name",SUM(K42:K46),"") Cheers JulieD "chief >" <<chief.1c814z@excelforum-nospam.com> wrote in message news:chief.1c814z@excelforum-nospam.com... > I have this formula in cell K47, but it comes up as #VALUE, what is > missing ...

VBA: Detecting multiply selected sheets
Hi there. Hopefully someone can help me with this, cause I can't seem to find any way to do it... I am trying to write a bit of code that will cycle through only the sheets that I have previously selected by clicking on their tabs (holding down 'ctrl' as if selecting multiple sheets to print) then do <something> with each of these selected sheets, ignoring the others in the workbook. I'll be stuffed if I can see how to do it though! :( Any suggestions?? Cheers all! Glen One way: Dim wkSht As Worksheet For Each wkSht in ActiveWindow.SelectedSheets &...

Create error msg based on calculation result in formfield using VBA
I have a protected Word 03 form with a 2 column table in it (A1:B8). In the table are 3 manual entry textbox fields that you can enter dollar amounts into (B1, B2 & B3), and the remaining 5 fields (B4, B5, B6, B7 & B8) have formula calculations. B4 is the sum of B2+B3. B5 is a percentage ratio of B1/B4. Basically what I'm trying to do is pop up an error message when B4 (the sum of B2+B3) is less than the dollar amount entered into B1. Or another way of writing it is if B5 is greater than 100%, I need the error message to pop up. Sometimes my code works, sometimes not, and...

find question on vba
Hi All I define two find 1. Find Key 2. Find Item In find key, the cell formula is =G2&"|"&V3&"|"&J2. I check the data, the find can not able to find a key value. The key value is on target sheet. But the find return nothing. What is the problem on data case return nothing ? With GP_WK.Sheets(MES.SHT_Name).Range(MES.KEY_RANGE) Set Rng_KEY = .Find(What:=GPD_KEY_VAL, _ After:=.Cells(1), _ LookIn:=xlValue, _ LookAt:=xlWhole, _ ...

VBA problem
My question is: In the first part of this code I set c, d, and e equal to the S8, T8 and U8 ranges respectively. However, when I use them in my sumproduct formula at the bottom of this code, they return P8 for c, Q8 for d, and R8 for u. What's the deal? Thanks!!! Sub MarkB() Dim m As Long Dim n As Long Dim o As Long Dim p As Long Dim q As Long Dim r As Long Dim s As Long Dim x As String Dim w As String Dim a As Range Dim b As Range Dim c As Range Dim d As Range Dim e As Range Set a = ActiveSheet.Range("I8") ...

How do I paste a graphic from Access datasheet to Excel using VBA
I'm trying to paste a graphic currently in an Access table (along with other data) into a spreadsheet in ERxcel. all other data pastes perfectly ok but the picture will not ? ? ...

Expand/Collapse sub-Bullet Animations
Looking for an easier way...Trying to show three headings on a slide, let's says with 2 bullets under Heading 1, 3 bullets under Heading 2 and 5 bullets under Heading 3. I can easily make all the bullets appear/disappear. What I'd really like to do is first show all three Headings only. Then on next click, make the bullets from Heading 1 appear while the Headings 2 and 3 move down. Then on next click, the bullets from Heading 1 disappear, Headings 2 and 3 move back up and the bullets from Heading 2 appear while Heading 3 moves down and so forth. In other words, I want the &q...

How to remove attachment in macro or vba code
Is it possible to access any of the builtin dialog boxes especially the one concerning attachments? I am trying to replace the use of OLE in Access 2000 to display text or picture files in a form with the file and folder specified in other fields. ...

VBA code needing alteration
I am a novice with VBA and require alteration to this code, if possible What i have now is the first 3 rows copying across. What i would lik is to have selected cells in the row copy. ie: a1, a2 and a4. Is thi possible?? Thank you Private Sub Commandbutton1_click() CopyData Range("E90:E100"), "MODEL" CopyData Range("E105:E113"), "UV CURING" CopyData Range("E118:E134"), "TRANSFORMER" End Sub Private Sub CopyData(rngC As Range, Target As String) Dim rng As Range, cell As Range Dim rng1 As Range, rng2 As Range Dim rng3 As Range Dim nrow...

Appending tables using VBA
Hello, Say for example I have two huge tables I want to append together, out of the 200 fields, 190 of them have exactly the same name and will be mapped to exactly the same place, but the rest 10 do not have the same name although they do have a corresponding mapping to the target table (say field: "Last Name" mapped to field name "LName" and so on), now, one way to write the SQL string is of course to map the field one by one, but is there anyway I could just write out the mapping of the 10 fields that are different and save the work to write out the mapping of the rest 1...

Passing a value in VBA using an offset
I have code that executes when I double click on a cell. The code inserts the data validation source into a combobox to ease the input choice. It refers to the cell I double clicked as "target" I want to add a new feature. Before anything else happens, I want to filter the data validation source (many of the entries are for dates that don't apply. the cell above "target" has a date. I want to copy the month of that date into a fixed cell ("A1") and then use that date in an advanced filter on the data validation source. Hope you're with me so far. T...

Excel VBA
I am using Excel 2002, and I am trying to create a macro to compare tw columns of data and highlight or shade the cells or colorize any entr that is not in both columns. I also read something about being able to put a button on the exce chart that runs the macro. Could someone help me with that too? : -- Message posted from http://www.ExcelForum.com Chip Pearson has lots of ways to compare two lists. Some are macros and some are worksheet formulas. http://www.cpearson.com/excel/duplicat.htm (I'm not sure I'd start with code. Learning the formula technique may be much more usefu...

VBA needed to delete corrupt records from MsysObjects
I have a form that will not open in normal or design mode and there are 2 Form_~TMPCLP######## objects in my VBA Project window, and there are 2 Objects with the same name in the MsysObjects table of type 32678 which means they are forms. I expect that if I am able to delete these I might be able to salvage my form. However, Nothing I have tried allows me to delete anything from MsysObjects. OH there is one other issue, Not able to run any code from the data base with that form in it. I get a message that the module can't be found... Nothing specific. So I have been ...