Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default commandbutton text/assigning sounds

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default commandbutton text/assigning sounds

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default commandbutton text/assigning sounds

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default commandbutton text/assigning sounds

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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default commandbutton text/assigning sounds

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sounds simple but isn't - displaying cell text pieman3 Excel Worksheet Functions 5 April 5th 09 03:58 AM
IF Then using a column of text and assigning a number to text Dan Excel Discussion (Misc queries) 5 August 20th 08 11:24 PM
Change commandbutton text from userform peter.thompson[_4_] Excel Programming 1 December 17th 05 06:59 PM
Assigning a Hyperlink to a CommandButton Andy T Excel Discussion (Misc queries) 2 December 21st 04 12:31 PM
CommandButton Text Grandad Excel Programming 3 September 3rd 04 10:57 PM


All times are GMT +1. The time now is 03:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"