PC Review


Reply
Thread Tools Rate Thread

commandbutton text/assigning sounds

 
 
Bishop
Guest
Posts: n/a
 
      5th Jun 2009
My first question: Can I underline just one letter in a word on a
commandbutton? So say I have the word "PG-13" and I just want the 3
underlined. Is this possible?

Second question: Can I assign a .wav (or similar soundbit) to a button so
that when the button is pushed or activated that sound will play?
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      5th Jun 2009
Try the below...

Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Sub Macro()
sndPlaySound "C:\1.wav", 1
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Bishop" wrote:

> My first question: Can I underline just one letter in a word on a
> commandbutton? So say I have the word "PG-13" and I just want the 3
> underlined. Is this possible?
>
> Second question: Can I assign a .wav (or similar soundbit) to a button so
> that when the button is pushed or activated that sound will play?

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      5th Jun 2009
Use the Accelerator property of your command button and type 3.
--
If this post helps click Yes
---------------
Jacob Skaria


"Bishop" wrote:

> My first question: Can I underline just one letter in a word on a
> commandbutton? So say I have the word "PG-13" and I just want the 3
> underlined. Is this possible?
>
> Second question: Can I assign a .wav (or similar soundbit) to a button so
> that when the button is pushed or activated that sound will play?

 
Reply With Quote
 
Bishop
Guest
Posts: n/a
 
      5th Jun 2009
I thought about that but that requires the use of the Alt key. I have a
userform with 15 or so commandbuttons and any 10 of those will have to be
selected, say. That means I'd have to press Alt each time I want to select a
button. I wanted to stick with the ability to just press a single key (like
the code you suggested yesterday) to make the userform more efficient.

"Jacob Skaria" wrote:

> Use the Accelerator property of your command button and type 3.
> --
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Bishop" wrote:
>
> > My first question: Can I underline just one letter in a word on a
> > commandbutton? So say I have the word "PG-13" and I just want the 3
> > underlined. Is this possible?
> >
> > Second question: Can I assign a .wav (or similar soundbit) to a button so
> > that when the button is pushed or activated that sound will play?

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      5th Jun 2009
Hi Bishop

I remember. Then why dont you try Keycode itself. Check the 2nd reply to
your previous post.

If this post helps click Yes
---------------
Jacob Skaria


"Bishop" wrote:

> I thought about that but that requires the use of the Alt key. I have a
> userform with 15 or so commandbuttons and any 10 of those will have to be
> selected, say. That means I'd have to press Alt each time I want to select a
> button. I wanted to stick with the ability to just press a single key (like
> the code you suggested yesterday) to make the userform more efficient.
>
> "Jacob Skaria" wrote:
>
> > Use the Accelerator property of your command button and type 3.
> > --
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "Bishop" wrote:
> >
> > > My first question: Can I underline just one letter in a word on a
> > > commandbutton? So say I have the word "PG-13" and I just want the 3
> > > underlined. Is this possible?
> > >
> > > Second question: Can I assign a .wav (or similar soundbit) to a button so
> > > that when the button is pushed or activated that sound will play?

 
Reply With Quote
 
Bishop
Guest
Posts: n/a
 
      5th Jun 2009
Yep, I just saw that. I'll read up on it and see if that works. thanks again

"Jacob Skaria" wrote:

> Hi Bishop
>
> I remember. Then why dont you try Keycode itself. Check the 2nd reply to
> your previous post.
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Bishop" wrote:
>
> > I thought about that but that requires the use of the Alt key. I have a
> > userform with 15 or so commandbuttons and any 10 of those will have to be
> > selected, say. That means I'd have to press Alt each time I want to select a
> > button. I wanted to stick with the ability to just press a single key (like
> > the code you suggested yesterday) to make the userform more efficient.
> >
> > "Jacob Skaria" wrote:
> >
> > > Use the Accelerator property of your command button and type 3.
> > > --
> > > If this post helps click Yes
> > > ---------------
> > > Jacob Skaria
> > >
> > >
> > > "Bishop" wrote:
> > >
> > > > My first question: Can I underline just one letter in a word on a
> > > > commandbutton? So say I have the word "PG-13" and I just want the 3
> > > > underlined. Is this possible?
> > > >
> > > > Second question: Can I assign a .wav (or similar soundbit) to a button so
> > > > that when the button is pushed or activated that sound will play?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning Sounds bookworm Windows Vista Mail 1 16th Feb 2008 03:57 AM
Assigning sounds and actions =?Utf-8?B?U3RldmVB?= Microsoft Powerpoint 5 1st Feb 2005 06:48 PM
Assigning a Hyperlink to a CommandButton =?Utf-8?B?QW5keSBU?= Microsoft Excel Misc 2 21st Dec 2004 12:31 PM
Assigning sounds to events... NoSam Windows XP General 0 22nd Apr 2004 12:09 PM
Help with assigning a macro to a commandbutton Dave Potter Microsoft Excel Misc 2 31st Aug 2003 03:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:05 PM.