+ Reply to Thread
Results 1 to 1 of 1

3 Simple Macros to toggle Num/Caps/Scroll

Hybrid View

  1. #1
    Registered User
    Join Date
    08-26-2011
    Location
    TheCloud, Internet
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question 3 Simple Macros to toggle Num/Caps/Scroll

    Hi guys,

    I would like to create a simple macro that will place 3 buttons on the screen which each in turn toggles there respective keyboard state; Num Caps and Scroll

    I'm not clued up with vbs, in fact I rarely use windows so this is all new to me.

    I understand code though so if someone provides me with a starting point i'll be able to move on from there.

    The code will go something like this for each button
    ButtonCaps.OnClick{
    	if(caps.status==true){
    		Caps on so switch off
    	} else {
    		Caps off so switch on
    	}
    }
    Anyone able to do this?

    I will then have the code i need to read the state of the keyboard LED and also change it.

    Many thanks

    P.s. I have tried to do this but keep getting the following error:
    Compile error: Method or data member not found
    Private Sub ToggleCaps_Click()
    If Selection.Information(wdCapsLock) Then
        System.Windows.Forms.SendKeys.Send ("CAPSLOCK")
    Else
        System.Windows.Forms.SendKeys.Send ("CAPSLOCK")
    End If
    End Sub
    Last edited by phillips321; 08-26-2011 at 06:17 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1