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

Similar Articles

[PageSpeed] 47

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:

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

Use VBA to update Access table or Query from Excel
Can I use VBA to update Access table or Query from Excel? Thanks in advance Hi Leungkong, > Can I use VBA to update Access table or Query from Excel? Of course, using ADO or DAO. See: http://www.erlandsendata.no/english/index.php?d=envbadacexportado Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Hi Jan, Thanks. I think ADO is what I want. But I am not only want to export from excel to access. I want to edit some data in access table. For example, Access has a table "ProductList" I want to use Excel to call the product by "Pro...

VBA and Scheduled task in Outlook
Hi, how can I: a) pull the query from somewhere and send it by e-mail automatically. E.g. I want to take a temperature table from http://www.wunderground.com/history/airport/EHAM/2009/7/10/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA where 2009/7/10 is the date of yesterday put it into an e-mail and send it automatically each day at 8 o'clock? b) if this is not possible, how can I send an e-mail with the attachment c:\Documents\query20090710.xls each day at 8 o'clock? my boss wants this automatized, I know how to write the VBA code for Excel, but don'...

Print, Merged Cells, and VBA
Hello I'm looking for a code that will help me with a print job for a worksheet. There are a lot of merged cells and a lot of "IF"s to be used in the VBA for range selection. Thanks in advance, Sarr ...

vba select field
Hi, having a button on a form, is it possible to select only some fields (all from the same table) of the current record instead of all fields? I've tried this code: RunCommand acCmdSelectRecord RunCommand acCmdCopy Forse dipende dei dati nel record. but it selects ALL fields in the form. Thank you. Remigio hi, On 10.04.2010 18:01, remigio wrote: > having a button on a form, is it possible to select only some fields > (all from the same table) of the current record instead of all fields? > I've tried this code: > > RunCommand acCmdSelectRecord &...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

Excel VBA/Macro programming for beginners
Hi all, I know a bit VB 6.0 programming. Will it help me to write exce vba/macro(same thing?).can anybody help me by providing some fre websites where i can have informations/codes for VBA/macro. Please tell me how could i make a *command Button * in a cell in th excel sheet -- sdebu_200 ----------------------------------------------------------------------- sdebu_2000's Profile: http://www.officehelp.in/member.php?userid=430 View this thread: http://www.officehelp.in/showthread.php?t=118812 Posted from - http://www.officehelp.i Try David McRitchie's "getting started with mac...

Loading a Form from VBA
Hi all, I'd like a module to open and load a form in my Access 2003 database... How can I do this? Use the OpenForm method. Look in the Help file for details. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Mike" <michael.leon.schwartz@gmail.com> wrote in message news:1184770076.109526.207900@o11g2000prd.googlegroups.com... > Hi all, I'd like a module to open and load a form in my Access 2003 > database... How can I do this? > On Jul 18, 10:58 am, "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com&g...

Turn pc speaker on/off with vba code
Is this possible? Thanks I found something here on how to do it withVBScript. You can probably modify it to work in VBA http://www.pcreview.co.uk/forums/thread-1468591.php -- HTH, Barb Reinhardt "David" wrote: > Is this possible? > Thanks Thanks Barb I'll have a go (I need to improve my web searching skills) "Barb Reinhardt" wrote: > I found something here on how to do it withVBScript. You can probably modify > it to work in VBA > > http://www.pcreview.co.uk/forums/thread-1468591.php > -- > HTH, > ...

Excel and VBA
I am very interested in learning more about using VBA in office, especially Excel. Can you post some resources (online, books, etc) that can be used to help learn about using Visual Basic in office. Thanks! Here's a good place to start: http://www.contextures.com/xlbooks.html Does that help? *********** Regards, Ron XL2002, WinXP "Bob Sinclair" wrote: > I am very interested in learning more about using VBA in office, especially > Excel. Can you post some resources (online, books, etc) that can be used to > help learn about using Visual Basic in office. >...

VBA Customization
Is there a way to get the name of the current company through VBA in Great Plains 8.0? Thanks for all your help. open GreatPlains. Add the current window, it will add the Toolbar then add fields choose the company name on the top left after the user id. >-----Original Message----- >Is there a way to get the name of the current company through VBA in Great >Plains 8.0? > >Thanks for all your help. > > > >. > Thanks. I tried, but I couldn't add company name to the field list. It opens up the login screen instead. Any thoughts? Thanks again. "ger...

Run VBA without show
I want excel to run the VBA code without showing me what it is doing. Which code should i use for that? Sub RunWithoutShow() Application.ScreenUpdating = False 'Paste the vba code here 'end of code 'Change screenupdating property to true Application.ScreenUpdating = True End Sub I hope this helps... Selva V Pasupathy For more on Excel, VBA, & other Resources Please visit: http://socko.wordpress.com You may also (inserting into quote from code example bellow from Socko) Use Application.Visible property to hide the application entirely Sub RunWithoutShow() Appli...

Form Controls vs VBA controls
I am new to VBA so just finding my feet, can anyone help me with th differences between an excel control (i.e. one from the form toolbox lets say a checkBox and a vba checkBox? From trying the two controls the I have noticed is that you canno capture the change event of the VBA checkbox in the code module, it ha to be done via the sheet (i.e. checkbox on sheet1, code goes in chang event on sheet1) the control is placed on, is this correct? What woul you do if you have three sheets with the same controls just differen data, do you really have to code the control 3 times? The excel control ho...

Referencing a ComboBox in VBA
Hi, I am using Excel 2007. I want to run some code in my Workbook_Open() Sub that fills a combo box on one of my Worksheets (I will call it myCombo on mySheet). I tried the following code and it did not work: myCombo.Clear myCombo.AddItem "Item One" myCombo.AddItem "Item Two" myCombo.AddItem "Item Three" I assume that the problem is that within the Workbook_Open() Sub, the reference to myCombo is not valid. Can anyone tell me if/how I can get a valid reference to myCombo (on mySheet)? Thanks in advance, Paul Kraemer -- Paul Krae...

inserting and renaming a sheet vba
Instead of having 2 lines of code, one to insert a new sheet and one t rename it, is there a way to insert a sheet with particular name i one go -- Matt Housto ----------------------------------------------------------------------- Matt Houston's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=451 View this thread: http://www.excelforum.com/showthread.php?threadid=26717 ...

VBA??
Is there any way i can input certain numbers and they change to words. for example. 2001 Omagh 2002 Craigavon 2027 Housing Benefit 2036 IT Replacment any help please thanks monty If you mean you want to enter 2001 in cell A1 and have "Omagh" magically appear in its place when you hit the return key, I don't think it can be done. However, if you enter 2001 in cell A1 and have a VLOOKUP formula in cell B1, with reference data stored elsewhere in the sprdsht, that is easily done. Monty How many substitutes do you have? You are probably best to set up a separate table with ...

Need VBA code that enters the F2 Key upon entering the Field
I am using Access 2000. I understand that simply by pressing the F2 key while the cursor is in that field, you can toggle Off and ON the highlighting for that field (textbox). Can someone explain the necessary VBA code to perform this action without the user's intervention? "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message news:E128AC11-3153-4A50-9873-F3BFACAC91B1@microsoft.com... >I am using Access 2000. > > I understand that simply by pressing the F2 key while the cursor is in > that > field, you can toggle Off and ON th...

Using VBA to automatically add a new date to my table?
I would like to have my table (perhaps through a form) automatically add a new record with the date, every 24 hours, starting at midnight, 24/7/365 How do I do that? Also, And how do I search my username VWP1, because I tried searching users, typed in my VWP1 username, and no records were found? VWP1 On Fri, 5 Mar 2010 08:23:02 -0800, VWP1 <VWP1@discussions.microsoft.com> wrote: >I would like to have my table (perhaps through a form) automatically add a >new record with the date, every 24 hours, starting at midnight, 24/7/365 >How do I do that? Why th...

Auto Calendars in VBA
Need to create a monthly schedule for work.To enter the dates (Numbers) into every other cell this is what I have so far Activecell.Select Activecell.Offset(0,2)=Activecell+1 I'm wondering is there an easier way to do this.Right now I have one module for the Year 2006 with sub's for each month.These will get called when form dropdown list show's that month. if frmMonth.cboMonth.Value="January" & frmMonth.cboYear.value="2006" then Call Year2006.Jan06 end if Is there an easier way to determine the today's date then creating Next month's c...

vba
salut j'ai une probleme sur vba que je n'arrive pas resoudre : j'ai un tableau de donnees (qui sont rentrees avec des userform). pour supprimer une ligne de ce tableau, j'ai cree un userform avec une liste deroulante dont la rowsource est la premiere colonne de mon tableau. je voudrais , en selectionnant une valeur ds cette liste, qu'elle soit selectionnee ds mon classeur excel pour que je puisse supprimer la ligne. merci de votre aide -- Ce message a ete poste via la plateforme Web club-Internet.fr This message has been posted by the Web platform club-Internet.fr ...

VBA Training
Are there any good books out there that would assist someone who wants to learn VBA from the ground up? Something that would take a person from a beginner to mid-level or beyond? Just wondering what others have done to become proficient. Rick Hi Rick, I bought a book for Excel 2000 that is loaded with all kinds of useful stuff. The book is called Excel 2000 Power Programming with VBA, by John Walkenbach. It includes a CD. Over 800 pages, a big book. Donna "Rick" wrote: > Are there any good books out there that would assist someone who wants to > learn VBA from the ...

VBA #6
When opening Excel or attempting to export from MS Great Plains to Excel, I receive the following: "Could not run the Visual Basic Environment. Please run Setup." "An error occurred initializing the VBA libraries (1157)" I have run setup for errors and tried re-installing Office XP Prof. w/o success! Any suggestions? Thanx. You might try Detect and Repair on the Excel Help menu. -- Jim Rech Excel MVP "dcs" <anonymous@discussions.microsoft.com> wrote in message news:2a2701c47e33$4f1785b0$a301280a@phx.gbl... | When opening Excel or attempting to expor...

Encrypt a Word document in VBA
I want to create a macro that in certain situations will encrypt the current document such that when the document is saved and opened again, Word will ask for the password (similarly to the user selecting the Office Button -> Prepare -> Encrypt Document). Would someone tell me how this can be done? Thanks for any help. To set a password ... ActiveDocument.Password = "whatever" To save with a password ... ActiveDocument.SaveAs name_etc., Password:="whatever" -- Enjoy, Tony www.WordArticles.com "JeffG" <JeffG@dis...

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...

Chart title VBA
Further to previous.... I cannot set the chart title, the lines; oChart.Chart.HasTitle = True oChart.Chart.ChartTitle.Characters.Text = "Progress curve" both return errors, "cannot get..." I have been using the macro as a go-by but they all refer to activechart. Why is it that my code fails? Graham For i = 1 To 2 ' UBound(mArrUIP, 1) 'add new sheet mcXL.AddAsLastWorksheet CStr(mArrUIP(i, 1)) Set shtPlot = Worksheets(CStr(mArrUIP(i, 1))) 'add new chart to the new (active) sheet Set oChart = Worksheets(CStr(mArrUIP(i, 1))).ChartObje...