Excellent Video Dan. Hi Dan. Can you Show how to Create a Class using (With Events). Example. I Have a Userform and I am creating 10 labels and 10 buttons Dynamically on startup. Userform initialize event. I want to be able to use the mouse move event on the labels and the click event on the buttons. I don't know how to call the Class using (with events) from the Userform after they are created dynamically. Can you help
Hi Amr, can you elaborate what you're trying to do? Are you saying you upgraded or switched from 2016 to Office 365 and it's not working? I would check the install and maybe try to run a repair install or uninstall Excel completely and try a clean install.
5:26 yeah it's stupid, because it is. ActiveSheet.Shapes("Rectangle 1").ShapeStyle = msoShapeStylePreset39 Tried this works, as i thought. Why use a shaperange on an object who is already a shape? Do you often use sheet1.parent.child or BS like this ?
You're absolutely correct! You can just use the ShapeStyle method directly from the shape. Love it. I think I must have gotten burned by using Form Controls, which are less direct. For example, if you use a Form Control Label and use the recorder to change the text, it uses the Selection.Characters.Text, but if you dare try to directly use Shapes("Label 1").Characters.Text it will give an error. You have to use the hidden OLEFormat.Object trick I showed in the vid. eg Sheet1.Shapes("Label 1").OLEFormat.Object.Characters.Text = "Test123" because Sheet1.Shapes("Label 1").Characters.Text = "Test123" 'will not work Thanks for the comments