We're setting up a test for candidates in an Excel 2010 workbook and want to get a sense of their native ability to spell. We'd like to disable spell check for the entire workbook. I've looked in Options>Proofing, even tried removing the dictionary, but haven't found a way to completely disable spell check from working. Is it possible to achieve? We'd settle for being able to disable spelling within a textbox.
I have is that the code does call the spell-check up and it goes through the motions.
However, when you perform this manually (as in from the toolbar), the spell-check accepts the items as you put in the text bar at the top if you change it.
When doing it via the VBA macro code, it will not accept the user amended-suggestions unless you highlight the (top) text bar area/row/cell to get it to accept some things - otherwise it just accepts the suggestion the checker gives n the section below - not the text you have amended.
I have a set of text boxes in my sheet. I was wondering if there is a way to perform a spell check on the textboxes only (not the cells in the worksheet). I have tried searching the code on the forum, found some which are using 'MSForms.TextBox', dont know why I am getting error.
It’s been working perfectly up until around an hour ago. However, now when I close Excel, I get compile errors.
These compile errors seem to be because Excel is trying to access controls in the workbook after it has closed. Since the workbook is closed, VBA can no longer ‘see’ the controls, and therefore it thows up errors.
I’m also getting a similar error on a Worksheets("DataExplorer").unprotect line, which seems to be because the worksheet isn’t there after closing.
These errors only occur when I close the whole excel application using the big cross in the top right. If I just close the workbook (using the smaller cross just below the big cross in the top right of excel), it doesn’t throw up these errors.
Just to clarify: all of the code runs perfectly when Excel is open. The errors are being thrown up for lines of code which run without problem until Excel is closed.
I am trying to ask to the user to check if they logged out when they close the workbook but my code is not working...
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("OD&D Log-in").Select If Range("H5") = "reconcile" Then a = MsgBox("Do you want to Log-Out?", _ vbYesNo) If a = vbNo Then Cancel = True If a = vbYes Then Sheets("OD&D Log-in").Select Else Workbooks("Daily OSD Log (ver5).xls").Close SaveChanges = True End Sub
I wrote this code to open an excel file when a button is pushed. I also have another piece of code to close the excel field when another button is pushed. The problem: the code to close the excel only works on my computer. There is no error message, but the file doesn't not close on others' computer. Can you please advise on a solution?
I am using Excel 2003 and have a column within my spreadsheet that, through a formula, inserts a decimal that has formatting to show as a percent. I would like to know who to convert that number to words. I saw spellnumber (and love it!) but don't know how to edit it so that it converts properly.
why I would be having trouble using the following formula in excel. Its purpose is to spell a number in english with dollars and cents. I have used the formula before and it has worked just fine, but now the formula will only give me " NAME".
Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count Redim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' String representation of amount. MyNumber = Trim(Str(MyNumber)) ' Position of decimal place 0 if none. DecimalPlace = InStr(MyNumber, ".") ' Convert cents and set MyNumber to dollar amount. If DecimalPlace > 0 Then Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _ "00", 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If
Trying to find a way to close outlook from excel workbook close. If outlook is open then delay excel workbook 45 seconds from closing.If outlook is not open then close excel normal. Here is what I've tried with no luck
I have the following code that needs to execute. Basically, every once in a while, our terminal program encounters an error that makes it so Excel and it can't talk to each other. The only way to fix this is by killing the entire process tree of both terminal and Excel, or restarting the computer. I've written this bit of code in the event it starts happening while someone is using the macro - it checks to see if the two can talk, and if they can't, it just kills both programs.
Is there any way to launch Excel with a 8 second delay, so that once the kill command executes, Excel re-opens? Or could I write a batch file with delay built in to execute prior to the kill command? I could use Shell to execute that prior to killing Excel, but I'm not sure if that's possible....
I currently use task scheduler to open a a spreadsheet at 4am every morning and run a macro. This macro refreshes data pulled from an accounting software. The macro also closes the spreadsheet at a specific time. After this is complete I have task scheduler open a separate spreadsheet and runs a macro to pull the data from the first spreadsheet into a dashboard presentation of sales data.
This all works fine...what I am looking to do is make sure both instances of excel get closed. Currently, this whole process is complete around 6am and when I get to work around 7 or 8 am there are two instances of excel still open. The workbooks are closed but excel is still open. When I am in the office I can just close these instances of excel but if I am out of the office these two instances of excel stay open and mess things up for the next mornings refresh.
Is there a way to make sure both instances of excel get closed? I am using the code below to close the spreadsheets.
Code: Sub Closeworkbook() ActiveWorkbook.Close True End Sub
I have an access database that runs some excel subs. If the excel sub doesn't meet a certain criteria, I want to close the excel workbook and close the access database. Most google searches yield how to close excel from access but I need closing access from excel. I was thinking that if the "detonate" criteria was met, I could pass a variable over to access and terminate that way....
If x 5 then thisworkbook.close myaccess.accdb.close end if
if x 5 then appAccess.application.run "Self-Detonate" thisworkbook.close end if
I use the following code to open an existing open workbook in a new instance of Excel...
Everything works fine... What I would like to do is close (when I say close I mean, completely exit/quit the application). I'm not able to do that, the original Excel instance stays open with no spreadsheet open. I would just like it force the application to quit so that after running the code I would just have one Excel instance open (with the desired workbook, which works fine now)...
Public Sub Re_open_workbook() Application.DisplayAlerts = False ThisWorkbook.Save
I have a folder which has a set of files (Files may be anything like excel,pdf,word..etc).My rrequirement is: When i run the macro the first file to last file should open and wait for 5 sec and then close..I mean first time the first file should open and wait for 5 sec and close..Next 2 nd files shoul open and close after 5 sec..next third files should open and close after 5 sec...Like wise till last file..Is this possible to achive through macro code..