Free Microsoft Excel 2013
Quick Reference
Free Microsoft 2013 Quick Reference Guide

Free Microsoft Excel 2013 Quick Reference

Excel VBA Editor Corrupt?

Greetings! I am completely stumped. I have both a laptop and a desktop. The "Detail" sheet of the attached workbook includes some code for the Worksheet_Change event. On the sheet, there is a ListObject ("tblDetail"). Here is the issue. On my desktop, the Worksheet_Change event fires any time I make changes in the ListObject. On my laptop, the Worksheet_Change event is acting very peculiar.

First, if I put a breakpoint at the start of the event, the code never breaks. I have even tried to code a breakpoint ("Stop"), and changes to the ListObject do not break.

But the real strange thing is that the first MsgBox displays if I add a row to the table, i.e., when a record is added to the ListObject, the code begins at the MsgBox. BUT a breakpoint at the MsgBox does not break the code either.

Has anyone ever heard of the VBA Editor becoming corrupt? I simply cannot understand what is going on. Any suggestion other than jump appreciated.


Post your answer or comment

comments powered by Disqus
Can I make the scroll wheel on the mouse work (ie scroll up & down) in the
Excel VBA editor? Doesn't work in the Access one either.

Hi all,

I wrote some Excel VBA code some time ago for a particular department within
my organisation. I always use VBA editor passwords that are somewhat related
to the particular department concerned - and to what application related
(i.e. Excel, Access or Word). However, this Excel coding was done a few years
ago - and would take me ages to re-write.

Is there some way that I can retreive the password that I used back then
that I have now forgotten, as I now need to make some modifications?

I sent this question to another Excel user newsgroup (not VBA) by mistake -
so I apologise for the cross posting

Thanks very much for your help.

Regards
Karen

Can anyone tell me what the Break button in the Excel VBA editor does.

So I'm working on this big macro in Module1 in VBA Editor and SOMEHOW, I overwrote my project with a month old "Backup of Project."

I do confess, I think I opened this Backup to look at it, but I thought I closed it.

To replace my current project with the Backup copy, wouldn't I have had to SAVE AS the backup with my current project name? So I would have had to type in this name in?

And further, wouldn't I have had to answer the question, "Do you want to replace the file?" with a "Yes" click?

None of these events happened, yet my project was replaced.

Can anyone enlighten me?

Perhaps I shouldn't be using VBA Editor?

This happened to me about 2 months ago too and I still have no idea how this happens.

While I am quite new to Windows Programming. I have written over 250,000 lines of FORTRAN over 15 years and used UNIX for over 10 years while an engineer at Pratt & Whitney.

Never, have I had problems like this with mainframe/workstation platforms.

Sorry for this stupid problem and rant,
Tom

Hi all,

I wrote some Excel VBA code some time ago, and I now can't remember
what password I used then to access the Excel VBA editor for the macros
that were applied to the spreadsheet.

Is there some way that I can retreive the password that I used back
then that I have now forgotten?

Thanks for your help.

Karen

Hi

I opened the VBA editor in Excel 2007 today and whenever I type anything e.g "Sub New" the editor seems to auto backspace after I press the space bar so I end up with "SubNew" which the editor does not then recognise.

Is there a setting in the VBA options? or has something changed in the way you type text into the 2007 VBA editor versus the 2003 editor (where I never experienced this)?

Thanks
Peter

Is there a way to password protect my code in VBA in MS Excel (the Visual
Basic Editor)?

Hi Folks,

I have a UserForm with all codes in VBA Editor. How do I assign it to a toolbar button in Excel?

Usualy I would right click on the button and assign the macro from the list. But this one is not shown on that list. I can see it only in VBA Editor.

Please advise.

Thanks,
Eduard

Hello,

I am having some annoying things happening with my editor that I would like to change if possible. I am using the VBA editor built into Office 2007 (Excel to be exact).

I am curious if it is possible to NOT have the editor change the view of code shown.

For example, if I am viewing the code to a particular userform, then run code that opens another userform, the editor automatically jumps to that code and once the userform is closed it shows the userform instead of code. This also means that the exact location in the text where I was working was lost and I have to refind it.

If there is a way to get the VBA Editor to "remember" where it was before code is run/userforms shown so that when everything is done running it reverts back to where it was previously?

I hope what I'm asking is clear; I'm not sure how to explain it :-

Thanks in advance,
googlebot

Dear All,

I need help with my VBA code which is not working. I am trying to use the following VBA code to sort my database based on a particular column – i.e. column B:


	VB:
	
 Range) 
    If Not Intersect(Target(1, 1), Range("A:L")) Is Nothing Then 
        Range("A:L").Sort Key1:=Range("B6"), Order1:=xlAscending, Header:=xlGuess, _ 
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom 
    End If 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

My database has 12 columns (A to L). The first 5 rows take up the headings – with all the headings formatted the way we require them. This means that – for some of the row headings, some of the cells are merged; the heading cells are not all equal in size. However, from Row 6 – the row from which we start entering data, all the cells are of the same size.

We use Excel User form to enter data onto the database. This is working OK.

The problem is with the sorting of the database based on column B (which contains Names of members). The first data entry row is Row 6 and the cell containing the first name is B6. In order to run the sort code, I right-clicked the sheet name (at the VBA editor) and pasted the code. But it does not seem to work. At some point, it comes up with an error message as follows:

“This operation requires the merged cells to be identically sized)."

I need help on what I should do to get the code to work. We require the database heading rows (rows 1 to 5) to remain the way they are – formatted. Please is there anything I can do so that upon clicking the ‘Add Data’ command button on the user form, the data will be added to the database and the sort code will run automatically and sort the database based on column B (not minding the fact that the cells making up the headings in rows 1 to 5 are not identically sized.

I have attached an abridged copy of the database (zip file)

Thanks for your anticipated help.

Buddy

I have a workbook with a small macro that is protected by a password. When I run the macro the VBA editor starts and the macro stops. When I unprotect the macro and hit the run button, it will start and run the macro just fine. The same workbook works "flawlessly" on other workstations, so I am thinking that it has to be a setting in Excel that I must have changed, but for the life of me I can't find a setting that will stop this from happening.

I am hoping that someone who reads this will know of a solution.

Thanks for any and all help!!

**Just discovered that this is not limited to Excel but does the same thing to WORD documents with macros as well.

hello,
I am having problems with the VBA Editor freezing at the most inconvenient of times when writing code and then clicking to the Sheet I'm working on, it just freezes up the whole of Excel and it has to be shut down and opened up again.
It seems like a memory problem at first, but there is sufficient memory
( 768Mgs, OS is XP Pro, Excel 2000, 9.02).

The work is not lost becuase I'm able to Save even at PC Re-boot, fortunately.

I've tested on 2 different PC's and the same happens. The only way to avoid the freeze it seems, is before I switch to view a worksheet, is to Save then click off VBA Editor and re-open.
When doing so, another symptom is it seems a huge amount of memory is freed up, ( pardon the terminology)

There is also a message that pops up when re-opening that same workbook that there are Formulas Linked to another workbook, but unable to find any after tediously searching every worksheet by using "Find, Look in Formula" there is nothing found, yet.

This freezing may happen twice a minute whilst pointing the mouse cursor from any VBA Edit window or worksheet and it's getting to a point of repetitiously having to Save, click off VBA Editor, and Click back on again each time I need to look at a respective Worksheet.
This only happens when I am doing fixes in VBA Editor, but whilst the workbook is running with no VBA editor opened, the very very long macro works fine.
I hope the above symptoms will help solve this time consuming issue.
Any suggestions would be appreciated,
Thanks

Hi, I hope somebody knows how to solve this one. My menus in the VBA editor are disabled, greyed out. The toolbars and even the right-click pop's are disabled.

I was using MZTools 3's code review module, when it crashed with some weird error of some class module not found. I exited Excel without saving changes to my file, and entered again excel to find the vba menus disabled. This condition is the same across the other office apps. (The app itself if fully working, is the vba editor the one out).

I uninstalled all the add-ins that I had, including MZT and still the same, even uninstalled Office and reinstalled it and the menus remain disabled!!

For every other matter macros run and work, and if I double click on a module or a form, it opens, and if i try to edit the code it gets edited. I reinstalled MZT and its toolbar is functional, when all others are disabled.

Anybody? Help!!!
thanks.

Hi there,

Am working with an VBA source code, in which .. some message is to be displayed in the MsgBox ... the message is in Japanese Font MS Gothic,

Am able to copy and paste the message from within the VBA Editor's one module page to another, also from one excel sheet to another,

but as for my requriement .. when i tried copying the message which is in the japanese font MS Gothic and tried pasting it .. in MSWord .. or any other text Editor... am not able to do this..

Please, anyone reply me what could be the problem and how could it be resolved??

Timely and useful reply is highly appreciated,

-thanks in advance,
Laxman....

Hi everybody!

Is it possible to check, with VBA code running some sort of "If" function in the background in an open workbook within which the VBA code is placed, whether a user is opening (or attempting to open) the VBA Editor?

This should see any attempt being made, whether the user uses Tools>Macro>Visual Basic Editor, Alt + F11 or right clicking on the Excel icon top left to "View Code".

If it is possible, could anyone please help me with VBA code that would do the checking? As you probably know by now - I am pretty useless beyond recording macros and plagiarising (I don't think messrs Funk or Wagnell will recognise that concoction!) code from you guys!

Thanks in advance

Harry

Good afternoon all,

Is there a way to exit a form without the VBA Editor popping up?

I have the following code for my cancel button:

Code:
 
Private Sub cmdCancel_Click()
    Unload Me
End Sub
When I hit Cancel, the macro stops fine, but I don't want the VBA Editor to pop up. I just want the user to be left on the Excel sheet...

Can anyone help?

I understand how to set up a button on the Toolbar in Excel to run a macro.

How do I set up a button on the Toolbar in the VBA Editor to run a macro/subroutine?

I can set up the button to pop up the 'select a Macro' to run window, but is their a way to actually specify the subroutine/Macro to run (without having to also select in the popup window)? [Excel 2003 SP3]
Thank You in advance- Fred

For some reason the scroll wheel on my mouse does not work in the VBA editor, it works fine everywhere else. Is this an Excel problem or a PC issue?

thanks
Fred

When I search for items in the Excel VBA Help system it will return a list of
items, many of which do not function as hyperlinks. For example I have
noticed that any help topic that has "(Visual Basic for Applications)" in the
title will not work. If I click on it nothing happens, it won't pull up the
topic in the window on the right that discusses that function. For some
reason, it seems that everything I wish to learn about is broken in the help
menu. I am doing these searches in the VBA editor.

Just an example: I search for "Loop"; one of the results is called
"Do...Loop Statement (Visual Basic for Applications)" IfI click on that, it
will do nothing at all.

Is there something that I haven't installed?

I used to run the MACRO by using the macro on menu bar.
I also know that most excel experts use UFD to run the program on spreadsheet. I try to copy the codes into the VB Editor on excel VBA.
I appreciate that someone can tell me how to apply the VBA-UDF and run it on excel. Thanks.

I've created an Excel workbook with several userforms and macros, and need it
to run on a Mac running Excel X. When I open the workbook in Excel X on the
Mac, and open the VBA Editor, none of my forms show up - as if the VBA
project contained no userforms at all - and executing the code to load and
show the forms causes an error.

I've read that the Mac version of Excel doesn't support ActiveX controls.
My question is: is there a way to build a userform in Excel VBA (in Windows)
using controls that aren't ActiveX controls? Or is ActiveX all there is for
building userforms in Excel VBA? I've seen people say to use the controls
from the Forms toolbar in Excel, but I don't want to add controls to the
workbook, I want to add them to a userform (if this makes any sense).

Thanks

Using a dual processor machine running windows 2000 using excel 2000, I run a
vba script that takes a while to complete. The task was taking exceptionally
long to complete, so I looked at the task manager to see how much CPU power
excel was using.

When the VBA editor is the active window, excel uses 50% of the processing
power (1 full processor), however, as soon as another non excel window is
activated, the cpu usage for excel drops to 0% (ie it stops running).

How do I get excel to run VBA scripts when it is NOT the active application?

Thank you

I'm currently working on a programme with excel 2003 (communicates with
word...)

Now it has 8 modules and 1 user form (with 576 controls, pretty
big...), totally 161K after exporting.

I noticed that when I open it, run the userform, close userform and
save the excel file...
The size of the excel file can vary from 329K to 427K. (cannot
understand...)

and when the file size is above 400K (approximately), if I run the
program from a button on spreadsheet or from tools menu/Alt+F8, Excel
will crush, need to be closed and want to sent a report to
MS...Heck...But if I open the VBA editor (Alt+F11) then run it (in any
possible ways), most of the times it works perfectly.

So anyone knows what happened? Does it mean that file cannot be larger
that 400K or one form can only have 575 controls? Or there are other
reasons?

Thanks....

Hi,

I dont know what setting has changed in Excel 2002 XP, now whenever i try to
use VBA Editor & make a sheet which was verylyhidden by code by me, it gives
me a message & does not make the sheet visible.

"Unable to set Visible property of the WorkSheet class"

Any help would be most appreciated.

Rgds,

Eijaz


No luck finding an answer? You could always try Google.