Macro Error In Workbook - Entire Ribbon & Icons Greyed Out
Mar 3, 2009
I ran a simple macro that I created in my workbook, got a run-time error, clicked debug, clicked reset to stop the macro running, and now all of the icons in my workbook are greyed out. I can select cells, change worksheets, enter information in cells etc....just I can't save the workbook, or select any of the icons on my ribbon / in the office menu. Would really like to avoid terminating the application as I made a number of changes that I didn't save (doh doh doh).
I've just finished writing some vb code that i need to assign to a button. Trouble is I select the control toolbox and put it design mode and all of the icons with the tool box are greyed out. pic attached below
pukks Auto Merged Post;Doh Doh and double doh!
Problem solved: I inadvertently had selected more than one worksheet tab and this was stopping me from placing a button on the worksheet.
I would like to restore some important functionality in Excel 2007 which has become disabled for a spreadsheet which I saved in different file formats.
I opened an Excel 2003 file with Excel 2007 and used 'Save As' into different formats (default, macro-enabled, binary) to see the resulting file size.
A number of Ribbon items are now greyed out for this file, including, - Insert - Tables, Illustrations, charts, etc. - Styles - conditional formatting and Format as table, - Formula Auditing - Data - just about all of them - View - some of the Window items. Also, I cannot resize or move a button on a worksheet.
Attempts to 'Save As' into the Excel 2003 format cause Excel 2007 to hang.
I want to catch an error and reset the entire code to the very beginning and skip that entire entry. When I use "Next fieldSheetName" I get "Next without For," error 1004. Searches tell me I have an open block somewhere, but that's not true. Removing that statement (and having the loop iterate as normal) has no error at all.
Dim employeeName As String Dim fieldMax, x, y As Byte ' Counters mostly Dim workedHours, fieldSheetName As Integer
fieldMax = 204 ' Row number to stop on in the field time sheet row = 4 ' Row specification for field time sheet. Begin at row 4 to ignore headers ' and start on the first name. This should not be changed! Col = 3 ' Start at column 3 then increase by one to start going to next time entry
' RESET HERE! For fieldSheetName = 4 To fieldMax Step 8 ' This is our MAIN loop. It iterates from 0 to fieldMax, which is 204...........
I have been using Excel for some time now but just started working back with the Macros! Finally figured out that you had to turn on the Designer tab to get to some of the functionality of the macros. I haven’t been able to find ANYTHING ANYWHERE to tell me how to create buttons or Icons in the 07 Excel!
I have an existing macro that takes my sheet and puts it in body of email.
how do i add to it to change the entire worksheet's font?
Code: Function RangetoHTML(rng As Range) Dim fso As Object Dim ts As Object Dim sTempFile As String Dim objWB As Workbook Dim i As Long Dim iLastRow As Long sTempFile = Environ$("temp") & "/" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"
I've created an Excel 2007 workbook with about a dozen worksheets that are full of formulas and links to other workbooks, as well as conditional formatting that isn't backwardly compatible with Excel 2003. However, many people who want to see this workbook are still on Excel 2003. I need to recreate an Excel 2003 compatible workbook with the appearance and formatting of the original and have all the formulas and links converted to values. So, the final product will "look" just like the original without the conditional formatting, links or formulas. It will just have the look, colors and values displayed for all cells.
Essentially, I want a macro that will copy however many worksheets (1-n) are in an Excel 2007 workbook to a new Excel 2003 workbook. I'd like the worksheets to retain their label names as well.
We are using Windows7 with Excel 2007. We have old code from excel 2003 and earlier that was adding a msoControlPopup with other sub-controls using the code below:
Code: Set HelpMenu = CommandBars(1).FindControl(Id:=30010) If HelpMenu Is Nothing Then ' Add the menu to the end
[Code].....
I tried going to Excel Options>Customize>Reset to reset any customizations to the quick access toolbar as this was recommended by something else I found online. This did not fix the problem.
I can find the control in the Immediate window but it just isn't showing in the add-ins tab. if I can find and repair that XML file perhaps?
I would like to be able to automatically minimize the Excel 2007 ribbon on opening a particular workbook. My preference is to be able to apply that minimization to certain worksheets only, but if that's not possible then minimizing the ribbons on all sheets in the workbook will be ok.
Will I also need a BeforeClose code as well to reinstate the ribbon so that it is visible when opening subsequent workbooks?
I am working on building a custom menu and I am looking for the code that would open a specific workbook execute a macro when I select the tab, can this be done????
Is it possible to edit and/or add extra symbols for the macro buttons? I mean to extended what the pallet offers Cutomsie Ribbon > Rename (As it is used to be before ribbon age with the ultra primitive built in symbol editor)
I have prepared an excel workbook with macros for a bill. In that I have protected the workbook (selected window also) after reduced the menu bar to just ribbon (HOME, INSERT,PAGELAYOUT,.......), so that I would get enough space. I have send it to my friends as WinRaR file. But when they open in their computer the sheet is not getting enough space to display the entire page as normally no body used to minimize the ribbon and formula bar. This is making lot of inconvenience. I tried one macro but it not recording the actions on ribbon.
For example - I have a two macro codes. One is change the Date Format from DD.MM.YYYY to MM/DD/YYYY and another one is Date Format from MM/DD/YYYY to YYYYMMDD.
I want to execute the macro from the customize ribbon through Add in Buttons.
See the attachment : Customize the ribbon with Macro code.jpg
I've been trying to research how to do this for a while now and still can't figure it out. My impression is that this is fairly straightforward in Excel 2010 since the menus and ribbons are easily customizable but not so in Excel 2007.
So far I can get macro shown as a button in the Quick Access Toolbar. But the issue is that I can't organize them or customize the icons.
I am trying to select something in VBA code in the Messages part of the ribbon and then Email Tags section of the outlook ribbon called Choose classification but not sure how to select this object. It is only available when you send a new email. I have been unable to paste a picture which would explain it better.
I am currently creating a database which involves using a macro to create new worksheets in the workbook. When the macro is run and a work sheet is being inserted, an input box asks the user for a worksheet name.
As you can imagine, the worksheet does not like it when the worksheet name input by the user, is the same as one already existing and so throws up a 1004 error.
In order to resolve this error I have included an error handling code to request the user to input a differnet worksheet name, as the one previously inserted exists.
My problem: It all works fine until the user types in an existing worksheet name twice, so once initially and again when the error handler has prompted a second attempt. On the second incorrect input a 1004 error warning is displayed.
I would like the error handler to keep repeating until a worksheet name that doesn't exist is inserted by the user. Is this possible?
I cannot figure out how to get my error handler to work, or actually, not work. It seems to work fine when there is an error, but the code still gets read even when there was not an error. Basically, I am trying to open a file, which may or may not be there. When it is not there I want a message to pop up informing the user. However, when the file is there and it opens, the error handler still gives the message box. Any ideas what I am doing wrong?
Private Sub btnOK_Click() Application. ScreenUpdating = False Dim LCSfile As String LCSfile = frmSelectFile.Listbox1.Value On Error Goto ErrHandler Workbooks.Open Filename:=sPath & sDate & "" & LCSfile & "QUANT.CSV" ErrHandler: MsgBox ("File is not quantitated. Please select another file.") Application.ScreenUpdating = True
This macro below is meant to search a sheet for a user selected value, select the entire row and copy it into a new sheet that has been created under the name of the user selected value. It will create said sheet, but isnt finding the value and/or copying the active cell row. Im not getting any errors so it has no issue with the coding itself, it just doesnt work, have i missed something obvious again?
How do I protect an entire workbook, rather than each worksheet, individually?
Also, I have several worksheets in this workbook. When info is entered in b8, I want this info automatically inserted in all other worksheets within that workbook.
I'm running a code to copy rows from one workbook and paste into another...Code runs but doesn't paste anything into the workbook.
Sub Macro2()
Workbooks.Open Filename:="J:BestExIncMikey_copy.xls", UpdateLinks:=3, ReadOnly:=False Dim c As Range Dim rng As Range Dim ws As Worksheet Dim Row As Integer Dim LstRow As Integer Dim i As Variant
For Each ws In Worksheets Select Case ws.Name Case "Total Locked Pipeline" Range("I2").Select Selection.End(xlDown).Select...........
I want to transfer my Excel-icons. Some of them are custom buttons where I have added user-defined functions. Is there any way I can do this? A list of icons with their function or purpose is OK as well.
All I want to do is save a copy of one sheet called "Patient Stock Form", change the name to "Patient Order", and put it into an email. But my code is putting the entire workbook into the email. Here's the code:
VB: Sub EMAILFORM() Dim oApp As Object ' Outlook.Application Dim oEmail As Object ' MailItem
I have a form that searches in an entire workbook for certain keywords, for example I fill in a last name in the textfield txtName and pus the search command button. As a result I get all the rows of the entire workbook containing this name. There are othre search fields in the form that do similar things...
Is there a code that would search for a name on a sheet and take me there when it finds it? The search buttonand place to write in the name would be on one sheet, all the possible names would be on a differant sheet. Also the names would not be in the same rows or columns. Each name will be under a picture so some space will be between names.