Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-24-2020, 09:19 PM
Pastor Pastor is offline PPT Macro wont change userform name Windows 10 PPT Macro wont change userform name Office 2019
Novice
PPT Macro wont change userform name
 
Join Date: Oct 2020
Posts: 4
Pastor is on a distinguished road
Question PPT Macro wont change userform name

I've entered this macro code into a module in a new ppt vbproject module:

Public Sub Rebuild_Custom_Message_Box()

Dim oForm As Object

'Create a FORM = .Add(3) /3 = MSFORM's type value
Set oForm = ActivePresentation.VBProject.VBComponents.Add(vbex t_ct_MSForm)

'Change the Name of the new form
oForm.Name = "CustomMsgBox"

'Change the Caption
oForm.Caption = "Message"



End Sub


See attached Word Document with two screen shots of the error.

I get a runtime error " #75: could not find the specified object" on the line shown in red text.

Userform1 is created and appears in the VBProject pane under the Forms folder Icon.

What is the correct macro code to change the name and caption of a newly created UserForm?


Thanks for your time, effort and concern in this matter.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
PPT Macro wont change userform name Change Userform Icon in Taskbar derajlance Word VBA 7 06-01-2019 08:02 PM
Change focus from userForm back to word document to see results. Hank Smith Word VBA 1 08-11-2014 05:00 AM
Change parent for control from frame to userForm? Cosmo Word VBA 0 05-30-2014 02:19 PM
PPT Macro wont change userform name proofing language wont change BigOldArt Word 2 01-18-2013 01:22 PM
[Word 2003] Macro's and a UserForm xanuex Word VBA 0 10-19-2009 05:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft