Lost The Menus

Apr 3, 2009

Having recently started to get involved in Visual Basic I have managed to write some code that has removed all of my menus except for File and Help. In a blind panic I deleted what I think was the offending VB code in a vain attempt to return the menus. This didn't work. I am now stumped.

Also, I managed to change the way the Cell selection works when I press Return. When I press Return, Excel now selects the cell to the right of the one I was in rather than the one below it. Is there a way I can change this back?

View 5 Replies


Macro Code To Create Custom Menus & Sub Menus

Jun 9, 2008

I am using the following code to create a custom command menu.

Sub AddMenus()
Dim cMenu1 As CommandBarControl
Dim cbMainMenuBar As CommandBar
Dim iHelpMenu As Integer
Dim cbcCustomMenu As CommandBarControl
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("&New Menu").Delete
On Error Goto 0
Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")..........................

I want to add a new button control at the bottom of the menu underneath the holiday control but it keeps adding it on the sub menu, which leads off the holiday button control. I want the menu to look like this.

Open Net 2 Access
Add Employee
Edit Employee
Delete Employee
Holidays (3 options on sub menu)
*New Control

View 4 Replies View Related

Custom Menus And Sub Menus For 2007

Feb 3, 2010

From this link: [url]

there is some clever code to create a customized menu in a dynamic Add-Ins section of the Excel ribbon; this section disappears when the workbook is deactivated and re-appears when it is activated. The custom menu has 2 main items each of which can launch a macro. There is also a 3rd main item called "Next Menu" which cascades nicely to a sub-menu. That sub-menu can have several items of its own. Very cool code.

However, I am trying to add a 4th item in the main menu, say, "Next Menu2" which also cascades to a sub-menu. The problem I'm having is when I try to replicate this code to accomplish this, "Next Menu2" appears in the sub-menu of "Next Menu", rather than as a separate (4th) main item below "Next Menu".

I believe there was another post (not sure of the date, but has since expired) which asked basically the same question as mine. There was a reply with code saying "This should work" but when I tried it, it didn't help.

View 3 Replies View Related

Create Toolbar Menus & Sub Menus

Oct 4, 2007

I want to create a submenu to an already existing user defined menu.

After creating and saving the sub menu using Tools ->Customize ,it works fine. But when

I reopen the Excel sheet it is not found.

I could not find any macro related to the original User menu.Also this menu gets displayed after the AUTO OPen macro in my excel has worked. This menu gets displayed for only that workbook and not for others.

I have been trying to find out a way to create Sub menu for that ,but could not?

View 3 Replies View Related

Lost Formatting

Nov 9, 2008

I have a workbook that is used by others and has been working reasonably well for several years. The users are youngsters who tend to play with it when a bit bored but I usually manage to put things right. They seem to have done something special this time.

The formatting for dates, time and money has gone and I cannot correct it. I have tried the usual formatting of cells, painting formats from other sheets, copying and pasting formats all to no avail. The whole sheet is effected so that new entries appear the same way although the correct format appears in the formula bar.

I don't know if this is relevant but the sheet relies on VBA form inputs. The code is password protected and only I know the password.

The PC is not connect to the internet or a network so I have ruled out a virus. (As far as I know, no floppies or USB sticks have been used on it either.)

View 14 Replies View Related

Formula Lost

Dec 3, 2006

I have been chasing this little devil for some time now and I'm fed up!!

I put a formula in cells formula bar and whenever it decides by itself poof its gone!!!

example formula would be say (in formula bar)


in say cell g31 with answer in cell 31.

Now it just dawn on me, this is an array correct so ctrol,shift, enter may be needed?? If so why do other cells with same idea work?

View 9 Replies View Related

Lost VBA Code

Jul 10, 2007

I just spent 8 hours of VBA coding completed and after exiting excel and re-opening the file, I have seem to lost all the 8 hours worth of VBA coding I just completed. For example, I created an extra module (Module 3) and that disappeared; I updated several SUB commands and even those did not update. My code was about accessing databases using the OpenDatabase method and I noticed that towards the end before I shut it, my connection to the database kept failing (hence the reason why I was closing it and reopening it).

View 3 Replies View Related

Lost On Multiple IF Functions?

Feb 27, 2014

I'm essentially trying to place a column that is largely based on another....a function that will calculate the following information

Carriers with 1 Vehicle - 25.00
Carriers with 2-4 Vehicles - 100.00
Carriers with 5-9 Vehicles - 200.00
Carriers with 10-24 vehicles - 400.00
Carriers with 25-49 vehicles - 750.00
Carriers with 50+ vehicles - 1500.00

In other words.

One column in my spreadsheet has number of vehicles. I want another column that will provide the according application fee as found in the information above.

View 13 Replies View Related

Lost Format After Pasting

Oct 11, 2007

I have two files: let's say File1 and File2.File1 has one column: datas are in a text format.I copy this column. I want to paste it in my second file.File2 is closed.I open it and i paste my column.
Here's my problem. If i let my first file opened, there's no problem(!!): my column is pasted as i want. My datas keep their original format.
But, if i close my first file and after, i open File2 and i paste my column, then my datas lose their original format.My column takes a numeric format.I can see it because my datas are on the left in the column.And i can chek it by a sum: if i do 400+200, for example, the result is 600. In the first case(text format), the result is 0.I don't understand why.If someone can explain me this situation, i'd be happy.I repeat: my second file is closed. I open it after my copy in the first file.

View 9 Replies View Related

Lost Part Of Sheet

Nov 13, 2008

I might have hit a wrong key or button, which caused a part of the current sheet not being displayed.

First column shown is C, but cols A an B are still in the sheet.

How can I get cell A1 in the left hand corner again?

View 9 Replies View Related

Lost All Formulas In Cells

Mar 11, 2009

On some worksheets and spreadsheets, when I save the formulas disappear, only to be replaced by the previously calculated values. It has become a real pain.

I assume this is something simple.

View 9 Replies View Related

Toolbars Lost After Macros Used

May 30, 2006

A IT Ordering system has been created using Excel, I am prompted to enable Macros, no problem there. The problem is that when I exit the worksheet using a formulas setup as an exit button, my Excel is displayed with my Toolbars missing. I have been unable right-click at the top and re-add these I am only presented with the option to minimise, close etc. 1. How can I replace my Toolbars? 2. Is there a formula fix so that I can use this worksheet without losing my toolbars?

View 3 Replies View Related

Lost The Ability To Cut And Paste ...

Mar 29, 2007

The thread title is the entire email message I got from a customer (thru the help desk). I have sent back asking her the following:

Is this happening in all excel documents you try or only some? Are you getting any sort of error message? Can you send me an Excel document you are having trouble with and tell me the exact actions you take?

While I am waiting for her answers, I thought I would ask here if anybody knew:What would cause this to happen?What sort of things I should look for?What other questions I could ask her?At the moment I do not know if she was in an Excel workbook that had vba code behind it or not. So my questions are for both what could be in vba code and what she could have done (without knowing) to cause this phenomenon

View 7 Replies View Related

Get The Menus

Dec 23, 2008

How to get the number of menus present in the excel?

View 9 Replies View Related

Leading Zeros Lost In Csv Format

Jun 9, 2009

I have an excel spreadsheet with numbers and the format has to show zeroes at the beginning (e.g. 0011111) It is always going to be a seven digit number. I can format the cells to show the numbers with the leading zeros, but as soon as I save the file as a csv, the leading zeros are lost.

Does anyone know how to the zeros can be retained when the file is saved in csv format?

View 10 Replies View Related

Sheet Has Lost The 'UNDO' Facility

Jun 23, 2009

I have created a spreadsheet in the field of marine surveying. In that sheet, I have used a lot of macros (21 modules) and a lot of VBA, most of it provided by kind people on this forum. But what has happened now, is that when I use that particular worksheet, the 'Undo' menu item in the 'Edit' menu has become permanently grayed out and it says 'Can't Undo'.

In other words, I cannot undo, even if I have made the wrong entry in an unprotected cell. If I use any other sheet, or make a new sheet, everything returns to normal. So, is there any way I can re-gain the 'Undo' facility, while using that particular sheet. I am using Excel 2003 on a Windows XP Home (SP3) platform.

View 4 Replies View Related

Recovering Lost Excel Work

Jan 12, 2013

I have been working on some files in excel for several days, saving regularly, etc. but have run into a huge problem. I was marking cells with a background color to organize and track my work, but the files being saved were .csv's.

From my research, it seems that .csv's only save data, not formatting such as cell background colors.

However, while I was working on the files, they displayed the colors correctly etc.

I am hoping that there is some sort of temporary file created by excel that would allow me to re-open my work and have the coloring appear so I can save the work as an .xlsx file with formatting.

View 1 Replies View Related

Lost Format After Running Macro

Jun 5, 2014

I have a summary sheet using a macro to summarise multiple other worksheets. However, when I run the macro, the summary sheet loses all formatting.

For example, in one column of the "target" worksheets, the data is entered on multiple lines within a single cell, using alt+shift. When I run the macro the formatting is lost and the data in this specific range is displayed in one long row in a single cell. Also, font formatting is also lost.

In the attached example, the top row shows the original formatting on the "target" worksheet, but below that is the formatting after the macro has run and this is what shows on the summary.

I need it to be formatted as on the original if possible.

View 5 Replies View Related

Lost Visual Basic Project

Oct 24, 2008

Have a project going and have had a disturbing trend develop. I'm working in Excel 2003. Upon opening the file and enabling macros, I started receiving File/Path errors, at which point it would shut down the application. When opened, I have a splash that would come up, but it wouldn't go to the next userform. At this point I would get the error message and the file would be closed. If I then reopened the file, disabled macros, saved under a different file name, and then reopened with macros enabled, everything worked fine, until I shut it down and then tried to reopen, at which point the same error would occur.

Lately I have simply been getting the Microsoft Excel dialogue box telling me an unexpected error occurred and it had to be shut down. I'm at a loss for what is causing this. The last time this happened, when Excel recovered the file, it told me a repair had been done, and the repair was to basically delete all of the VBA code from the file.

View 14 Replies View Related

Lost Toolbar Paste Function

Nov 27, 2008

It appears that my toolbar paste button has been disabled and I think this is due to an auto open macro.

Does anyone know what macro code I will need to run to regain the use of this button?

View 14 Replies View Related

Merged Cell - Lost Functionality

Oct 5, 2011

I feel like I have lost some functionality due to merged cells. For a worksheet change event I have the following:

ElseIf Target.Value = "" Then ... blah blah blah

For a normal cell, every time a cell is deleted (in the appropriate target zone) then it runs the code I have in the subsequent lines

Except it doesn't work for merged cells, unless I manually go into the cell, backspace all of its contents and then press enter

View 9 Replies View Related

Lost Relative Reference Icon

Aug 11, 2006

I went to record a macro but I can't seem to get the relative reference button anywhere. I am using Excel 97 - does anyone know why this might be or how I can get it back?

View 9 Replies View Related

File Error: Data May Have Been Lost

Jan 25, 2008

We have an excel template with numerous VBA and Macros embedded within it, saved on a central drive. I am able to access this file ok, however, when I save it when it is reopened by either myself, or a colleague, we get the "File error: data may have been lost" message. Everyone else within my organisation can open the template, edit, and save and subsequently reopen the spreadsheet without any problems at all.

One thing I have noticed, which to me seems strange is that the files I save that have the "error" message are slightly smaller in size than the ones my colleagues save (350kb vs 417kb)

My IT department have tried unintalling Excel and reinstalling, and also rebuilding my profile, all to no avail. A trainer has sat with me to check I am not using the spreadsheet incorrectly (or differently to anyone else, and this is not the case).

View 9 Replies View Related

File Error: Data May Be Lost

Mar 23, 2004

I know, I know... should've backed it up... there exists no other copy of the file in question newer than it's initial creation two weeks ago (been working on it solidly since).

The data does appear to be there but, rather mixed up... does anyone know of any methods/tools/software that might be able to salvage as much of the data (needs to be in it's original structure as it's a cross match excersice) as humanly possible?

View 9 Replies View Related

File Error: Data May Have Been Lost ...

Jun 28, 2007

I have created some Excel files using Excel 2000 on Windows Server 2003. The Excel version is given as 9.0.6926 SP-3. When I open them using Excel 2000 in Windows 2000 after a few sheet deletions I get the error message "File Error: Data May Have Been Lost" when opening the files. The Excel version is given as 9.0.8948 SP-3 in Windows 2000 (why is it different to the version number in Server 2003? Could this be part of the problem?) It crashes on this line

If Sheets(3). Name <> "template" Then

with the error "Run time error 32809 Application defined or object defined error".

The template sheet is very hidden. When I try and unhide it I get the 32809 error again.

View 8 Replies View Related

Drop Down Menus

May 22, 2008

I want to have a spread sheet where a user will pick an option from a drop down list, then based on that option choice, have a different cell populate with a specifc drop down menu.


Cell A1 has a drop down with three choices (1,2,3)
User selects option 1
Cell B1 will now have a drop down with options A,B,C
If user selects option 2 from A1
Cell B1 will now have a drop down menu with options X,Y,Z

View 11 Replies View Related

Creating Two Menus

Oct 11, 2009

I have a workbook which uses the code below to create a new menu upon opening. I have now used this same code in a second workbook to create a different menu. both work OK on their own However if by chance both workbooks are opened at the same time only one menu is shown. Is there a way I can change one of these to create a second menu if the first one is already there?

View 4 Replies View Related

Multiple Menus (add More)

Jan 13, 2010

I have this code which adds one menu at the top of the worksheet and I want to add more. My current sheet has a large number of scripts liatsed under it for different purposes and I'd like to divide it into different menus.

View 3 Replies View Related

Change Location In Dropdown So Information Is Not Lost?

Aug 27, 2013

I created a drop down in a file that contains a list of locations. The people that run these locations have to input data (mileage) in other areas of the worksheet. Is it possible to have the data in the cells change as someone changes the location in the drop down so the information is not lost or overwritten each time?

I am really trying to avoid making a workbook with several tabs.

The cells that are colored blue are the cells that the people will have to put input into. I would like to be able to keep the data from all the cells that are blue each time they change the location. The rest of them are already set to change with the location change via a formula. Those are all based on data that I pulled and was able to provide.

View 2 Replies View Related

Slicer Connections Lost When Copying To New Workbook

Jun 12, 2014

The main objective of the code is to create different workbooks that are going to be send to different people(with only their data).

I am using the filter to delete the data that I don't need and then create a new workbook, save it and close it. This has been working fine.

The issue is that I have two slicers in the 'DistMenu' sheet. When I open again the newest workbook, they slicers are disconnected to the pivot tables. This can be fix manually by selecting the slicers --> PivotTables Connections etc

I use the macro recording to get a code and work from there, but is giving me error '1004' "Unable to get the PivotTables property of the Worksheet class".

View 1 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved