Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating right-click menus

I have an excel worksheet with multiple text boxes. I want to create a
right-click menu that will allow me to select "copy" or "paste", just like
you can do in MS Office apps. My idea (as I am not an accomplished VB
programmer) is to create a list box that is called on right mouse button
click. Where do I go from there?
Here is what I have so far...

Private Sub TextBox11_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

If Button = 1 Then
Me.Label10.Visible = True
ElseIf Button = 2 Then
Me.ListBox1.Visible = True
Else: End If

End Sub

Private Sub TextBox11_MouseUp(ByVal fmButtonLeft As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

Me.Label10.Visible = False

End Sub

Where...Label10 is just a tooltip, and TextBox1 is my box containing "Copy"
and "Paste". Also, can I make the listbox position variable based on cursor
position?
Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating right-click menus

I am also considering using a form instead of the listbox. The form would
have two control buttons. One would use the Clipboard.SetText function and
the other would use the Clipboard.GetText function. Does this sound viable?

"HappyInUtah" wrote:

I have an excel worksheet with multiple text boxes. I want to create a
right-click menu that will allow me to select "copy" or "paste", just like
you can do in MS Office apps. My idea (as I am not an accomplished VB
programmer) is to create a list box that is called on right mouse button
click. Where do I go from there?
Here is what I have so far...

Private Sub TextBox11_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

If Button = 1 Then
Me.Label10.Visible = True
ElseIf Button = 2 Then
Me.ListBox1.Visible = True
Else: End If

End Sub

Private Sub TextBox11_MouseUp(ByVal fmButtonLeft As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

Me.Label10.Visible = False

End Sub

Where...Label10 is just a tooltip, and TextBox1 is my box containing "Copy"
and "Paste". Also, can I make the listbox position variable based on cursor
position?
Thanks for any help.

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
Right Click Pop Up Menus Disabled Steve Excel Discussion (Misc queries) 5 May 5th 08 08:34 PM
Right click menus guild0001 Excel Discussion (Misc queries) 4 July 6th 07 08:56 PM
Right-Click Menus - Customizing s boak Excel Discussion (Misc queries) 6 October 9th 06 08:04 PM
Right-click menus elaine Excel Worksheet Functions 1 January 24th 06 07:26 PM
customizable right click menus aerobul Excel Worksheet Functions 1 March 19th 05 01:26 AM


All times are GMT +1. The time now is 12:46 AM.

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

About Us

"It's about Microsoft Excel"