Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 1st, 2003, 01:46 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I disable a key in vba for word?

Hi!
How do I disable a certain shortcut for example "ctrl + 1" in Word?

I want to disable a macro, either by disable it's shortcut or disable the entire macro from the code in another macro.

Does anyone know how?

 
Old August 3rd, 2003, 08:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Depending on what you want to do - a fairly simple solution would be to have wrap the rest of the macro in a big If statement, so that it only runs if certain criteria are met - or you could use an inputbox or something along those lines.

For example:

Code:
Dim strInput as String
strInput=InputBox "Enter some text"
If strInput="YourText" Then
 DoTheRestOfTheMacro
End If
Steven

I am a loud man with a very large hat. This means I am in charge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable the [SHIFT Key] on Startup ru1 Access 4 September 22nd, 2007 09:27 PM
Disable browser F5 Key arif007khan Javascript How-To 10 September 22nd, 2007 03:22 AM
Disable F10 key in IE chrscote Javascript 1 March 21st, 2006 07:23 AM
how to disable enter key for a particular button g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 1 January 19th, 2006 11:22 AM
How do I disable a key in vba in word? nesplb Pro VB 6 0 August 1st, 2003 01:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.