Force Caps Lock

H

Harald Staff

John said:
Doesn't work for me Harald

My fault. I assumed this was for entering/pasting stuff and not for clicking
Print, as I now realize you asked for. Sorry. Routine is a dangerous
companion.

Best wishes Harald
 
I

il_magpie

John:

Here's the code to automatically turn the Capslock option on when the
workbook is opened:

Private Sub Workbook_Open()
SendKeys "{CAPSLOCK}"
End Sub


Basically, the SendKeys command will act as though you've typed the
stuff inside the quotes. By placing it in the Workbook_Open event, it
happens as soon as you open the workbook.

Alternatively, you could also write code in the

Private Sub Workbook_BeforePrint(Cancel As Boolean)

event. You could loop through all the cells in the range that needs to
be changed using the UPPER function.

Hope this helps,
Varsha
 
J

John

I've run in to a problem with the code. It converts entries such as ^001 to
1. I need it left at 001

Can I do anything?

Thanks


John said:
Thats it Chip, it works, thanks for your assistance, I'm still very much
learning
 
D

David McRitchie

Hi John,
The macro will convert formulas to text. But your problem
with 001 being converted to 1 is because the macro
in effect reenters the data. Format the column as text
beforehand. Just occurred to me that the ^001 was
really meant to be '001 which would be text. And you
are correct, I do see an entry of '001 being converted to 1

All the more reason to format the column as text.
so that reentry will not change text to numbers.
But if you had a number the number would then be
converted to text.

General is just a default that makes assumptions as to
whether an entry is text or a number. If you want the
something specific you will have to give it the correct
format rather than rely on a default.

This has nothing to do with the macro. But the macro
will convert formulas to values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top