SendKeys :: Switch On Caps & Number Lock On Opening A Document
Jan 17, 2010I want to switch on Caps & Number lock on opening an Excel document. I'm using the following code;
View 10 RepliesI want to switch on Caps & Number lock on opening an Excel document. I'm using the following code;
View 10 RepliesWould like to set CAPS-LOCK On and Off using VBA. Can someone help please?
View 5 Replies View RelatedHow do you programatically enable the CAPSLOCK key in VBA? I've tried:
Sendkeys "{CAPSLOCK}"
When I run this, Excel's status bar flashes "CAPS" for about 1 second then disappears. It seems to have no impact on the keyboard for case-sensitivity - which is what I'm shooting for.
I have the following codes to test Caps Lock whether it is on or off. Instead of showing a msgbox when the Caps Lock is on, I there another way to show comment or other object as well as windows UserForms
View 3 Replies View RelatedI have a userform contains a label control .. what I want is showing that label when Caps Lock is on and hide it when Caps Lock is off.
View 14 Replies View RelatedI am trying to open a word document from within excel using
View 2 Replies View RelatedI have a shared document that I want other team members to enter data only into. For some reason when they open the shared document it is showing as read only to them how to fix this? See below settings used
View 2 Replies View RelatedIs there a way to hide the column headings/row headings and gridlines automatically when a workbook is opened without having the user go to the view tab and unchecking the appropriate boxes?
View 2 Replies View RelatedI am basically using a combobox in word that opens an excel spreadsheet and pulls information about the people entered in the combobox. The information pulled from excel is then pasted into the original word document.
The problem that I am having is that the macro may be needed to run twice (ex. suppose the user forgot to include an individual in the first run) and on the second run the excel document cannot be opened and it gets stuck on the loop. The macro will only work again if the word document is closed and reopend. I suspect that the excel document is not completly closing on the first runthrough.
I've included my code below. The initialize combobox code is on the bottom. I
PHP Code:
Dim WordApp As Word.ApplicationDim xlApp As Excel.Application
'Dim xlWB As Excel.WorkbookPrivate Sub CommandButton1_Click()Bios
= ActiveWorkbook.NameNewWBookName
= ActiveWindow.CaptionSet WrdDoc
= ActiveDocumentlastrow = Range("A1").End(xlDown).RowS
[Code]....
Does anyone have a way to change columns of text entered in all caps to the initial capital letter and the rest of the text in small letters.
As in: JONES to Jones.
Add a column next to the first name. The in that column use the formula
=Proper(A1), A1 being the cell that contains the first name. Then copy that
cell down. Do the same for Last Names. Then keep the cell values, and delete
the original set.
Should be an easier way I think (selecting the entire column and using
conditional formatting) but MS hasn't seen fit to do this yet.
--
John C. Harris, MPA
JCZ Consulting Services, LLC
"Robert Judge" <RobertJudge@discussions.microsoft.com> wrote in message
news:56F8D0DC-3D88-441F-9B47-A5CCDFD133A4@microsoft.com...
>I have an EXCEL worksheet with columns including first name and last name,
>in
> all capital letters:
>
> Column A is JOHN
> Column B is SMITH
>
> How can I change all the names so that, for example, JOHN becomes John and
> SMITH becomes Smith?
I have several phone numbers that I copy and paste from the web:
I.E:
(888) 456-7890
(333) 234-5678
I need to switch all of them to just standard numbers: They should look like this:
8884567890
3332345678
I go to "format" - "cells" - "numbers" but nothing works. I wonder if any formula can do it. It should work for ALL THE LIST, I want something else than change them one by one by hand.
I have a first & last name with a number in cell B2 which looks like the following;
939 Smith, Silvia
I would like to drop the numbers and just return 'Silvia Smith'.
I have the following part of the formula to drop the number and it works. =RIGHT(B2,LEN(B2)-FIND(" ",B2)) Need to know how to layer in the other part of the formula to switch first and last name.
I have an excel database where I register cases. I have in it a button that creates a folder with and ID nr that is in column A (I create new ID nr in the next row, when I press the button it will create a folder with that ID nr and inserts a blank word document in it). We have a template that we copy to the folder (depending what type of case). The idea would be that once the template is filled in and ready to print, It would take the values from the ID nr and a reference number a few cells to the right. Is it possible to tell excel to open the word document in the folder and create a PDF version with the ID nr and reference number. (there are only 2 templates, so the macro would have to look for one of the two in the folder) The names of the templates are: "Standard" and "Other". I guess the best way to start maybe this would be that I select the cell with the ID nr and then press a macro button to have this done. One thing that needs to be done, is to put a copy in the same folder and another in a second folder called "Binder" in my documents folder.
View 1 Replies View RelatedI have created a very long switch statement, which is too long to be placed in one row in VBA. I have attempted to put a space and underscore at the end of one line and continue the statement on the row below by placing a comma at the start of the second line. VBA will accept my efforts, but when I run the statement in the immediate window, the following error appears.
"Invalid procedure call or argument"
I understand that there are certain rules where I can split a switch statement onto two lines, yet I do not know what they may be.
I have an excel program that is supposed to count word instances in a word document. I can't seem to find the right declaration for a word document.
For example to declare a workbook in excel its
Dim wb As Work Book
I've tried
Dim doc As Word.Document
'or
Dim doc As Word.Application
as shown in some of the forum posts, but an error user-type not defined keeps displaying.
I would like to be able to enter a number in cell a1. Let's say 44.2. I want that number to actually be locked in as 100'-0" in cell b1. Below in the next row I want to enter another number, lets say that one is 41.5 into cell a2. And then I want the cell b2 to return the difference in feet and inches. So ultimately the only cells that I will entering data into is in column a and column b would just return information.
The other thing I am trying to figure out is a formula for converting decimal feet to feet and inches (which I have found) but a formula that is less than 40 characters.
I have made a Excel base "Application form".....it is a master copy.
I want to send a copy to a client....which has a unique serial / code number e.g. IF/001/2014.....
Presently, I am doing it manually, as application send to many clients...it become a hectic job to remember / note down the serial number....
I am trying to use a "Active X control" button to generate the desired serial number.....
There may be five categories.... IF, IA, OGG, WC, TU respectively.
I want five button to perform this job....
I'm trying to copy the content of a word document (File A) to another (File B) using Excel VBA. File A has about 100's of pages (not sure of the number as it varies) and this needs to be split to different files, each having 15 Pages.
Below is my code, where I'm able to select the content of the first Page and paste it in the target folder, but not sure how to determine the number of pages in word using excel VBA.
Note: Copying the content should be done, page wise only.
[Code] .....
I have an excel sheet which is protected (mainly so that the users will not change any formulas) the excel sheet is basically a list
Just to put you in the picture
Column B Is PO Number
Column C Is Remarks
Column D Date
Column E Description
Column F Supplier
Column G Amount
I would like that when Column C changes to "OK Checked" column B C D E F G are protected and locked. But obviously for that particular row.
For example the input of Cell C15 changes to "OK Checked" then B15, C15,E15,F15,G15.
the macro must NOT be fixed to a particular row (in this case 15)
I am processing a fair few Invoices, which are being sent to me via e-mail as excel documents, very often they contain mistakes, a decent amount of mistakes. Usually the prices are wrong.
I keep track of every single entry on the invoice on my own document - Tracker, which I consider to be the superior/more correct document to the Invoice presented to me by my contractor.
Both of the documents have a reference number, which is a specific docket number, and horizontally, in the invoice, there is going to be a price for this docket. In my document, there is going to be a separate column for the total price.
Is it possible (I guess with VBA) to check for mistakes in the Invoice, but use the Tracker as a reference for this check.
Tracker has
columns
A - Name
B - Department
C - Date
D - Docket No.
C - Total price for the docket (calculation of E to Z)
E to Z - all smaller entries
Invoice has
columns
A - Date
B - Docket No.
C to E price for that docket, but it is spread, because departments are separated out, so each VAT account can be charged accordingly. I guess it is possible to do a separate column for the price, if it is easier to do a script that way.
Basically, I need to check if in the Invoice document, the price (C to E) for Docket No. (B) is the same as the price (C) for the Docket No. (D) in the Tracker.
I would like the wrong entries to be highlighted on the Invoice Document, so I can see straight away, that this needs attention.
Not always the price is wrong, sometimes the Docket No. is spelled incorrectly (Dyslexic contractor), hence the highlighting.
I need a script that will turn a excel doc into a txt doc. Thats the easy part. The hard part (at least I think it is), is I need it to be in a certain format and I'll do my best to explain that fomat below.
View 9 Replies View RelatedI like the proper formula and find it handy, however do you know if there is a formula that would only keep the first letter in the cell at caps and reduce the rest to lower case, ie
A1 = MY DOG IS WHITE
proper(A1) = My Dog Is White
what I want is only first letter caps = My dog is white. I'va had a decent look around but can't find anything that would do this?
It appears that the excel IF statement caps out at eight arguments. Is there a work around for this? I need to enter 29 arguments... Does excel have a CASE or Array function?
Example-works:
=IF((H3="Weight1"),"A",IF((H3="Weight2),"B",IF((H3="Weight3"),"C",IF((H3="Weight4"),"D",IF((H3="Weig ht5"),"E",IF((H3="Weight6),"F",IF((H3="Weight7"),"G",IF((H3="Weight8"),"H",""))))))))
Example-doesn't work:
=IF((H3="Weight1"),"A",IF((H3="Weight2),"B",IF((H3="Weight3"),"C",IF((H3="Weight4"),"D",IF((H3="Weig ht5"),"E",IF((H3="Weight6),"F",IF((H3="Weight7"),"G",IF((H3="Weight8"),"H",IF((H3="Weight9"),"I""")) )))))))
I have code in VBA that takes a source Excel file and parses it to multiple re-formatted worksheets. Each formatted worksheet is different depending on a variable in the source. There are n of each type of data (1:n Water Sources, 1:n Water Treatment, 1:n Water Storage). Each item needs a copy of a blank re-formatted worksheet appended to the end of the existing data-type worksheet. For example: Water Source #2 is appended to the bottom of Water Source #1 on the same worksheet.
Currently, I am opening the blank re-formatted workbook each time an additional variable of same type is found in the source file. Meaning, if there are 8 Water Sources, I am opening and closing the blank re-formatted workbook 7 times to copy a blank Water Source to the bottom of the Water Source worksheet and then populate the data. AND if there are 3 Water Treatment, I would open and close the blank formatted workbook 2 more times to copy a blank Water Treatment to the bottom of the Water Treatment worksheet. The same goes for Water Treatment.
Obviously, a huge waste of resources and performance. I would rather open the blank re-formatted workbook once (first time an additional worksheet is needed), use the worksheets as needed, and close it at the end.
Attached is my current, working code of the above.
How should I re-write it to check if the blank workbook is already open use it, if not open it?
Code:
Sub Add_Facility(ByVal Worksheet_Name, Copy_Range, Max_Limit)
Dim Last_Row As Integer
Dim Source_Range As Range
Dim Dest_Range As Range
Dim wkb As Workbook
Set wkb = ActiveWorkbook
[Code] ........
I was handed an Excel Spreadsheet containing a list of names. Within the sheet there are three names (Elizabeth, Amy, and Daniel) that contain upper and lower case letters. The desire is that all names are in CAPS. However, these three names refuse to remain as CAPS when overwritten in the cell. As a note, other names can be typed in those cells and will successfully remain as typed, either U/L case or all CAPS. Another note, if the Replace feature is used, the names remain as Replaced.
View 9 Replies View RelatedI have a column of cells which looks like this:
"JUMPING LAZY brown fox"
I need to put the non capitals in the front as so:
"brown fox JUMPING LAZY"
I have looked in conditional formatting, but do not see a way to change lower case to all caps. Is there a way to do this so that when someone types in a cell it returns all caps instead of leaving it in lower case?
View 9 Replies View Relatedthis is the code i'm using but sometimes it runs sometimes it runs incorrectly; i've been told that sendkeys is not a good choice and i should use API but i'm just studying VB6 and i do not know what is API; so i need a code to copy and paste in a module this is the code with sendkeys that i need insterad with API
Sub b()
Shell "C:Program FilesEquisThe DownLoaderDlwin", vbMinimizedFocus
SendKeys "%{T}", Wait:=True
SendKeys "{o}", Wait:=True
SendKeys "{A}", Wait:=True
SendKeys "{DOWN}", Wait:=True
SendKeys "{TAB}", Wait:=True
SendKeys "C:Documents and SettingsfrancoDesktop", Wait:=True
SendKeys "{TAB}", Wait:=True
SendKeys "matrice1.txt", Wait:=True...............
I have a column with names, where i need the 1st letters of the Names to be displayed in CAPS. If its a Single letter also, the same should be displayed in CAPS
View 2 Replies View Related