Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Word Macro


  • Please log in to reply

#1
karenlane

karenlane

    New Member

  • Member
  • Pip
  • 2 posts
Hi there,

I'm pretty new to macro's but what I want to know is how many macro's with shortcut keys can I assign. I want to be able to produce up to 200 macro's for people in the office but when I try to assign shortcuts keys eg: ctrl+1, ctrl+2 etc once I get up to number 9 and then try assigning number 11, it over writes number 1. I guess there must be a way to do this... any help would be appreciated.

With Thanks
  • 0

Advertisements


#2
dsm

dsm

    Member

  • Member
  • PipPip
  • 98 posts
Karen,
I don't think you will get to 200 shortcut keys, however you can use ctrl or alt or both + an alpha or numeric key provided the combination is not currently used. eg. ctrl + b is already assigned for bold text.


Another approach may be to have a single shortcut key which prompts the user for a code word or number which you then use to programatically call the relevant macro.

eg.


Sub Macro1()
'
Dim MacCode As String
Dim Dummy As Variant

MacCode = InputBox("Enter a Macro Code")

Select Case MacCode
Case "Macro2"
Call Macro2
Case "Macro3"
Call Macro3
Case "Macro4"
Call Macro4
Case Else
Dummy = MsgBox("No Match, Try Again", vbOKOnly)

End Select

End Sub
Sub Macro2()
'
Selection.TypeText Text:="2222222222222222222222"

End Sub
Sub Macro3()
'
Selection.TypeText Text:="3333333333333333333333"

End Sub
Sub Macro4()
'
Selection.TypeText Text:="4444444444444444444444"

End Sub
  • 0

#3
karenlane

karenlane

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts
Thank you so much, i will give that a try.

Regards,

Karen
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP