Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Force Caps Lock

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Force Caps Lock

Use:
data=WorksheetFunction.Upper(data)

John wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Force Caps Lock

Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:

Use:
data=WorksheetFunction.Upper(data)

John wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Force Caps Lock

Thanks JWolf for your replies, I'm very much a novice on VBA and usually
just record it. How would I construct the code to say place caps lock in
cells A1:B3 in sheet1

Thanks


"JWolf" wrote in message
...
Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:

Use:
data=WorksheetFunction.Upper(data)

John wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Force Caps Lock

Rightclick the sheet tab, choose "View Code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim C As Range
On Error Resume Next
If Intersect(Target, Range("A1:B3")) _
Is Nothing Then Exit Sub
For Each C In Intersect(Target, Range("A1:B3"))
If C.Formula < UCase$(C.Formula) Then _
C.Formula = UCase$(C.Formula)
Next
End Sub

HTH. Best wishes Harald
"John" skrev i melding
...
Thanks JWolf for your replies, I'm very much a novice on VBA and usually
just record it. How would I construct the code to say place caps lock in
cells A1:B3 in sheet1

Thanks


"JWolf" wrote in message
...
Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:

Use:
data=WorksheetFunction.Upper(data)

John wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is

it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Force Caps Lock

Doesn't work for me Harald


"Harald Staff" wrote in message
...
Rightclick the sheet tab, choose "View Code", paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim C As Range
On Error Resume Next
If Intersect(Target, Range("A1:B3")) _
Is Nothing Then Exit Sub
For Each C In Intersect(Target, Range("A1:B3"))
If C.Formula < UCase$(C.Formula) Then _
C.Formula = UCase$(C.Formula)
Next
End Sub

HTH. Best wishes Harald
"John" skrev i melding
...
Thanks JWolf for your replies, I'm very much a novice on VBA and usually
just record it. How would I construct the code to say place caps lock in
cells A1:B3 in sheet1

Thanks


"JWolf" wrote in message
...
Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:

Use:
data=WorksheetFunction.Upper(data)

John wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is

it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print

icon?


Thanks








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Force Caps Lock

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo cleanup
Application.EnableEvents = False
Dim MyRange As Range, Cell As Range
Set MyRange = Range("A1:B3")
For Each Cell In Target
If Union(Target, MyRange).Address = MyRange.Address Then
Target = UCase(Target)
End If
Next Cell
cleanup:
Application.EnableEvents = True
End Sub


This is a Woorksheet Module, right click on the sheet tab, select view
code and paste into the code window.


John wrote:

Thanks JWolf for your replies, I'm very much a novice on VBA and usually
just record it. How would I construct the code to say place caps lock in
cells A1:B3 in sheet1

Thanks


"JWolf" wrote in message
...

Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:


Use:
data=WorksheetFunction.Upper(data)

John wrote:


Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Force Caps Lock

Can't get that Code to work JWolf



"JWolf" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo cleanup
Application.EnableEvents = False
Dim MyRange As Range, Cell As Range
Set MyRange = Range("A1:B3")
For Each Cell In Target
If Union(Target, MyRange).Address = MyRange.Address Then
Target = UCase(Target)
End If
Next Cell
cleanup:
Application.EnableEvents = True
End Sub


This is a Woorksheet Module, right click on the sheet tab, select view
code and paste into the code window.


John wrote:

Thanks JWolf for your replies, I'm very much a novice on VBA and usually
just record it. How would I construct the code to say place caps lock in
cells A1:B3 in sheet1

Thanks


"JWolf" wrote in message
...

Sorry, forgot VBA's function:
data=UCase(data)

JWolf wrote:


Use:
data=WorksheetFunction.Upper(data)

John wrote:


Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks







  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Force Caps Lock

To do it before printing, use this code:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Range("YourRangeHere").Value = UCase(Range("YourRangeHere").Value)

End Sub

The code must go in the ThisWorkbook code section since it is an even
procedure and will execute before the workbook is printed.

K

P.S. Responding to your last post (missed it the first time), you woul
use:

Sheets("Sheet1").Range("A1:B3").Value
UCase(Sheets("Sheet1").Range("A1:B3").Value

--
Message posted from http://www.ExcelForum.com

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Force Caps Lock

Thanks KK works great


"kkknie " wrote in message
...
To do it before printing, use this code:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Range("YourRangeHere").Value = UCase(Range("YourRangeHere").Value)

End Sub

The code must go in the ThisWorkbook code section since it is an event
procedure and will execute before the workbook is printed.

K

P.S. Responding to your last post (missed it the first time), you would
use:

Sheets("Sheet1").Range("A1:B3").Value =
UCase(Sheets("Sheet1").Range("A1:B3").Value)


---
Message posted from http://www.ExcelForum.com/





  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Force Caps Lock

Just tried your code KK on the range (as opposed to a single cell - which it
worked on) and I keep getting a debug error. The following is what I've
placed in This Workbook


Private Sub Workbook_BeforePrint(Cancel As Boolean)

Sheets("Template").Range("A9:C43").Value =
UCase(Sheets("Template").Range("A9:C43").Value)

End Sub
"kkknie " wrote in message
...
To do it before printing, use this code:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Range("YourRangeHere").Value = UCase(Range("YourRangeHere").Value)

End Sub

The code must go in the ThisWorkbook code section since it is an event
procedure and will execute before the workbook is printed.

K

P.S. Responding to your last post (missed it the first time), you would
use:

Sheets("Sheet1").Range("A1:B3").Value =
UCase(Sheets("Sheet1").Range("A1:B3").Value)


---
Message posted from http://www.ExcelForum.com/



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Force Caps Lock

I was afraid that wouldn't work. Should have tested (duh).

Modify to this:

Dim r as Range

For Each r in Sheets("Template").Range("A9:C43").Value
r.Value = UCase(r.Value)
Next

This will loop through the cells individually and should work.



--
Message posted from http://www.ExcelForum.com

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Force Caps Lock

John

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on worksheet tab and "View code". Copy/paste the above.

NOTE: as written it works only only columns 1 through 8(A to H). Alter that
if needed under Target.Column 8 line.

Gord Dibben Excel MVP

On Tue, 25 May 2004 15:56:46 +0100, "John" wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks


  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Force Caps Lock

Gord, thanks for your response, I've tried all variants on the topic but
none have worked - I'm lost



"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
John

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on worksheet tab and "View code". Copy/paste the above.

NOTE: as written it works only only columns 1 through 8(A to H). Alter

that
if needed under Target.Column 8 line.

Gord Dibben Excel MVP

On Tue, 25 May 2004 15:56:46 +0100, "John"

wrote:

Is it possible to force Caps Lock on entry via VBA? Failing that is it
possible to 'refresh' data over a certain range to Caps Lock on the
triggering of an event, that event being clicking on the print icon?


Thanks




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
How to lock the Ctrl key? (as locking the Shift key w/Caps Lock) Rick-cel Excel Discussion (Misc queries) 2 August 5th 09 06:45 PM
forcing caps lock XCESIV Excel Worksheet Functions 1 May 31st 06 04:18 AM
Force Caps in a cell?? tagr Excel Discussion (Misc queries) 3 March 18th 06 05:23 AM
Caps Lock Franco Turrinelli Excel Programming 0 February 25th 04 03:39 PM
Caps lock Paula Osheroff Excel Programming 2 October 13th 03 10:41 PM


All times are GMT +1. The time now is 09:44 PM.

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"