Sub Doesnt work in PowerPoint

L'Amore

Board Regular
Joined
Aug 21, 2013
Messages
116
This is in my userform initialise:
Code:
PrepT (CommandButton1)

This is a seperate sub
Code:
Sub PrepT(TitleButtonToPrepare As MSForms.CommandButton)
    
    With TitleButtonToPrepare
        .Visible = True
        .TakeFocus******* = False
        .Font.Bold = True
        .Font.Size = 8
    End With
End Sub
can anyone suggest why this wont work?, it jsut returns type mismatch everytime
:(

EDIT:
is O n C l i c k a dirty word on this forum? :P


EDIT2: ps. this is in powerpoint not excel, if that makes a difference?
 
Last edited by a moderator:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You should remove the parentheses:
Code:
PrepT CommandButton1
or use Call:
Code:
Call PrepT(CommandButton1)
 
Upvote 0
You should remove the parentheses:

**** it!!, yes, thanks, i was just looking at something similar where someone else had a similar problem but forgot i had seen it :(, and i think it was even you that answered it!
So, Thanks again for the help!, you are a credit to the community!
 
Upvote 0

Forum statistics

Threads
1,225,653
Messages
6,186,200
Members
453,340
Latest member
yearego021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top