If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
PPT VBA - Clicking on non-existent textbox?
Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his
life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig |
#2
|
|||
|
|||
Zigzag,
There are several ways to do what you want to do. If you want to create shapes and make them clickable in run time, check out Example 7.9 on my Web site: http://www.loyola.edu/education/PowerfulPowerPoint/ Go to "Examples by Chapter" and "Chapter 7." In example 7.9, you want to look at the PrintablePage procedure. This procedure creates a slide and puts some text on the slide. Additionally, it creates two buttons: homeButton and printButton. These buttons are created and assigned a macro to run, which is just what you asked for. However, if I were doing what you wanted, I would probably create all the shapes in advance and hide and show the shapes as needed, using the shapes' ..Visible properties. That way, you don't have to keep track of what has been created and deleted, and you don't have to worry about using code to add text or make shapes clickable. All the code needs to do is hide or show the appropriate shapes by setting .Visible to True or False. --David David Marcovitz Author of _Powerful PowerPoint for Educators_ http://www.loyola.edu/education/PowerfulPowerPoint/ "Zigzag" wrote: Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig |
#3
|
|||
|
|||
Unless you are really stuck on doing this using VBA, there is an easier way.
Create one "More" button for each set of text that is longer than one box. Give it an appear animation. Drag that appear animation to just after the triggered animation for the first text box. Now, when you click the trigger for the text box, both the text box and the more box appear. (Oh, and don't forget to add it's exit to the trigger for making the second text box disappear. But you know that already.) About OO - Think about a light switch. From the standpoint of one in the room, all they care about is that flipping a light switch turns on a light. It is an object that when moved causes something to happen. It is connected to objects called wires that are either open circuits or closed circuits. When open they carry content (electricity) to the light. When closed they turn stop carrying content. Each layer of OO code is an object doing something to either content or another object.(Another way to think of it: Instead of functions that pass data as parameters, in OO worlds there are objects that do things to data.) -- Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books Get PowerPoint answers at http://www.powerpointanswers.com I believe life is meant to be lived. But: if we live without making a difference, it makes no difference that we lived "Zigzag" wrote in message ... Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig |
#4
|
|||
|
|||
Monsieur Ziggie, bon soir.
This bit of appears to be VBA has a SNOBOL's chance of helping you do the deed, you pascal (how appropriate at this time of year) rascal. Go forth. Blaise new trails! Use VBA to create popup text http://www.rdpslides.com/pptfaq/FAQ00691.htm In article , Zigzag wrote: Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#5
|
|||
|
|||
Hi David,
Thanks for the response, I'll have a look at the example you mentioned. All the code needs to do is hide or show the appropriate shapes by setting .Visible to True or False. I effectively tried this for a couple of "More " textboxes using the custom animation fade in and disappear. The problem is not the fact that the boxes don't show but as they are on top of one another in the zorder only one becomes clickable (whether it is showing or not). Changing the zorder at runtime does not seem to change which box is actually clickable (it always appears to be the one on top when the presentation starts). For a matter of record, I also tried to motion path the boxes to and away from the position I wanted them in but the clickable areas for both boxes remained at their starting positions. It's as if the clickable areas get 'locked' when the presentation starts. I'll have a look at the example. Cheers Zig "David M. Marcovitz" wrote in message ... Zigzag, There are several ways to do what you want to do. If you want to create shapes and make them clickable in run time, check out Example 7.9 on my Web site: http://www.loyola.edu/education/PowerfulPowerPoint/ Go to "Examples by Chapter" and "Chapter 7." In example 7.9, you want to look at the PrintablePage procedure. This procedure creates a slide and puts some text on the slide. Additionally, it creates two buttons: homeButton and printButton. These buttons are created and assigned a macro to run, which is just what you asked for. However, if I were doing what you wanted, I would probably create all the shapes in advance and hide and show the shapes as needed, using the shapes' .Visible properties. That way, you don't have to keep track of what has been created and deleted, and you don't have to worry about using code to add text or make shapes clickable. All the code needs to do is hide or show the appropriate shapes by setting .Visible to True or False. --David David Marcovitz Author of _Powerful PowerPoint for Educators_ http://www.loyola.edu/education/PowerfulPowerPoint/ "Zigzag" wrote: Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig |
#6
|
|||
|
|||
I have never seen the behavior you described. If a shape is not visible, then
it should not be covering anything up, and it should not be clickable. What happens if you set the top and right of the shape to something like -500 -500. Then, it surely won't be covering anything up (or visible). Of course, you can set the Shape's ZOrder by using shp.ZOrder msoSendToBack --David David Marcovitz Author of _PowerfulPowerPoint for Educators_ http://www.loyola.edu/education/PowerfulPowerPoint/ "David M. Marcovitz" wrote: Zigzag, There are several ways to do what you want to do. If you want to create shapes and make them clickable in run time, check out Example 7.9 on my Web site: http://www.loyola.edu/education/PowerfulPowerPoint/ Go to "Examples by Chapter" and "Chapter 7." In example 7.9, you want to look at the PrintablePage procedure. This procedure creates a slide and puts some text on the slide. Additionally, it creates two buttons: homeButton and printButton. These buttons are created and assigned a macro to run, which is just what you asked for. However, if I were doing what you wanted, I would probably create all the shapes in advance and hide and show the shapes as needed, using the shapes' .Visible properties. That way, you don't have to keep track of what has been created and deleted, and you don't have to worry about using code to add text or make shapes clickable. All the code needs to do is hide or show the appropriate shapes by setting .Visible to True or False. --David David Marcovitz Author of _Powerful PowerPoint for Educators_ http://www.loyola.edu/education/PowerfulPowerPoint/ "Zigzag" wrote: Ah, Monsieur Hollerith is a good fellow but he doesn't know how easy his life was. Cards? We only had stacks of wooden slabs. And we had to run thread every which way through them before we could think of starting. And they kept the machinery atop a mountain we had to climb every morning. Barefoot. Through thorns that grew atop the icepack. Luxury. And you tell kids these days and they don't believe you. Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad enough in Fortran. I'd still be punching at it if I'd done Cobol! I too started with Fortran, then Pascal, then Cobol. When starting Cobol I believed it was like writing in sanskrit, it looked so archaic. But you know, after a while, I preferred it. I believe the effect is something akin to the Stockholm syndrome. Now OO languages I just can't get my head around. That's not a criticism of the genre, just my view of them. Which brings me, longwindedly, to my problem which I hope someone can help me with. I am experimenting with putting together a presentation on one slide using animation appear and disappear effects. I know that a work-around would be to use more than one slide but I would like to learn how to resolve this particular problem. When I click on an image, an associated descriptive textbox fades in. This is fine until I have more text than I can reasonably show in the textbox. If there is more text I display a "More " textbox on the slide and make it clickable to fade out the original description and fade in the additional text. This works hunky-dory until I have more than one image with two pages of text. As the "More " textboxes are located in the same position on the slide then ppt only allows me to click on the one on top of the zorder. I've tried moving the appropriate "More " textbox to the top of the zorder using vba. This moves the textbox but doesn't make it clickable when running the show. Understandable but not the effect I want. So here's what I now want to do: Click on an image to display the descriptive text and Create the "More " textbox (where appropriate). Click on the created "More " textbox to fade out the descriptive text, show the additional textbox and remove the "More " textbox. I can use vba to create the "More " textbox but I don't know how to make it clickable and associate a procedure with it when it doesn't exist at runtime. I need to do this for each image where there is more than one textbox worth of descriptive text. Any help would be appreciated. TIA Zig |
#7
|
|||
|
|||
Hi Kathy,
Welcome back to 100 Aker Wood. About OO - Think about a light switch. I think I've given a slightly misleading impression regarding my approach to OO. I understand, roughly, how it operates and I do have certificates in Javascript and Java. What I can't get to grips with is the need to know what objects exist and what can and can't be done by built-in procedures. For instance, I want to add an effect - what methods are available and on which object(s)? I want to create a textbox in runtime and make it clickable to do something. Honest to God, Kathy, I didn't know where to start. I tried the vba help and tried to extrapolate from examples, all to no avail. "Think, think, think". Given the popularity of OO I can only resign myself to the fact that I have a short circuit somewhere which refuses to identify the logic behind these languages. "Oh, bother". With the 'old' languages you had a number of commands that you applied in a logical sequence to achieve what you wanted - read, manipulate, write. Now, you can do all sorts - if you know what's available, or so it seems to me. Unless you are really stuck on doing this using VBA, there is an easier way. Create one "More" button for each set of text that is longer than one box. Give it an appear animation. Drag that appear animation to just after the triggered animation for the first text box. Now, when you click the trigger for the text box, both the text box and the more box appear. (Oh, and don't forget to add it's exit to the trigger for making the second text box disappear. But you know that already.) Have already tried this Kathy. The problem lies in the fact that I might have more than one "More" box at the same location on the slide even if only one is showing. PPT seems to 'lock' the clickability of the top box even if you change the zorder in runtime. Regards Mr. Sanders |
#8
|
|||
|
|||
Groan!
There's only one thing you can say to that: Gol Forth Solo Mantis AndF Multi-pascal. Sorry about the Lisp. Zig (& CAT) |
#9
|
|||
|
|||
Here is just what you need:
http://support.microsoft.com/default...b;en-us;222101 Austin Myers MS PowerPoint MVP Team "Zigzag" wrote in message ... Hi Kathy, Welcome back to 100 Aker Wood. About OO - Think about a light switch. I think I've given a slightly misleading impression regarding my approach to OO. I understand, roughly, how it operates and I do have certificates in Javascript and Java. What I can't get to grips with is the need to know what objects exist and what can and can't be done by built-in procedures. For instance, I want to add an effect - what methods are available and on which object(s)? I want to create a textbox in runtime and make it clickable to do something. Honest to God, Kathy, I didn't know where to start. I tried the vba help and tried to extrapolate from examples, all to no avail. "Think, think, think". Given the popularity of OO I can only resign myself to the fact that I have a short circuit somewhere which refuses to identify the logic behind these languages. "Oh, bother". With the 'old' languages you had a number of commands that you applied in a logical sequence to achieve what you wanted - read, manipulate, write. Now, you can do all sorts - if you know what's available, or so it seems to me. Unless you are really stuck on doing this using VBA, there is an easier way. Create one "More" button for each set of text that is longer than one box. Give it an appear animation. Drag that appear animation to just after the triggered animation for the first text box. Now, when you click the trigger for the text box, both the text box and the more box appear. (Oh, and don't forget to add it's exit to the trigger for making the second text box disappear. But you know that already.) Have already tried this Kathy. The problem lies in the fact that I might have more than one "More" box at the same location on the slide even if only one is showing. PPT seems to 'lock' the clickability of the top box even if you change the zorder in runtime. Regards Mr. Sanders |
#10
|
|||
|
|||
GROOOOAN Sorry about the Lisp. Zig (& CAT) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Textbox, web browser control, and Unicode (got cutoff) | Mark Johnson | General Discussion | 0 | February 12th, 2005 01:08 AM |
Setting the Control source of a textbox to a query based on the valueof another textbox on the same form | Joey | Running & Setting Up Queries | 1 | January 26th, 2005 03:35 AM |
textbox to normal text | Jack Sons | New Users | 16 | December 5th, 2004 03:44 PM |
textbox used as report parameter | jh | Setting Up & Running Reports | 4 | October 21st, 2004 06:59 PM |
textbox formatting problem | jeffrey c | Powerpoint | 4 | August 21st, 2004 10:09 AM |