Suspend SheetActivate Event Temporarily?
Dec 14, 2011
I have a Sheet Activate code so that when going through a workbook, range a1 is always selected.
However, i have another macro, which navigates through each monthly sheet in the workbook, and uses cell a19 as a 'topleft' const cell, with a time delay, so that i can view a chart in the same place for each month on each monthly worksheet, kind of like a journey through time.
The problem i have, is that i need the sheet activate functionality when normally navigating through the sheet, but this overrides my macro which needs to open sheets with cell a19 as the top left cell.
So my question is, can you disable a sheet activate sub at the beginning of a macro, and activate it again at the end?
View 3 Replies
ADVERTISEMENT
Oct 27, 2008
Can you suspend a userform after open an excel file from the userform? I have a userform that allows the opening of excel files (one at a time), but the user has to close the userform to access the excel file. Can I work with the file while the userform is still active?
View 2 Replies
View Related
Nov 12, 2006
I am presently trying to debug a large and repetitive piece of code and find that I keep ending up in a function within the same module. I assume this is because the function is being triggered as I manipulate data. If this is the case, does anyone know how to suspend the function while I debug? I guess I could comment it out as I do not need the data it is returning but during normal running, this is not possible and I expect if it is fired off then it will slow things down considerably if my code keeps getting interrupted by interreupts from the function.
View 2 Replies
View Related
Apr 28, 2007
how to suspend/hibernate some specific sheets in one workbook , to free cpu power?
View 5 Replies
View Related
Oct 29, 2009
Is there a way to, on a temp basis to remove the read only feature when enabled and then re-enable it after a VBA routine is excuted?
View 10 Replies
View Related
Apr 29, 2014
I've set up a method to register users so they can use my applications. Very simple, First Name/Last Name/Scan your ID card. Unfortunately, that is apparently not "idiot-proofed" enough for some of my users. They keep entering their full name into the first name section, then they'll repeat the same information (full name) in the last name section. I swear they're doing this kind of stuff just to annoy me and see if they can break what I build.
Anyway, is there a way to change a single cell so that if the user hits the spacebar, it will simply tab to the next cell.
View 6 Replies
View Related
Jul 11, 2006
I have a workbook that opens full screen without any menus including the Worsheet Menu Bar. When the sheet opens the Title bars and Workshheet Menu Bars are visible
at first and then the sheet jumps to full screen without either. I tried to prevent seeing this screen jump by surrounding my code for hiding
all menus & viewing full screen with-
Application. ScreenUpdating= False
Application.ScreenUpdating=True
This works in other sections of code as intented but has no effect here. Even though I realize this has no functional benefit, because I am already able
to use the entire screen, I would like to find a way to hide this screen jump.
View 8 Replies
View Related
Dec 7, 2006
I want to temporarily display a userform (maybe for 4seconds) when my spreadsheet loads.
I cannot grasp the ontime function, and from what I can tell most messages posted on here relate to using it for intervals, or to be used at a set time in the day. (I have looked at the Helpsheet for the Ontime function, but struggle to apply what is being said to my situation)
View 3 Replies
View Related
Jan 18, 2013
I have a vba function linked to conditional formatting that i want to temporarily stop while a sub to insert a line is running as the sub stops when it hits the sheet where the vba function operates. When i disable the vba function (or remove the vba function) the sub works fine, if the vba function is not disabled the sub stops.
View 4 Replies
View Related
Jul 12, 2007
How do disable Private Sub Macro
I have a private sub macro for Sheet1 as shown below
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address "$B$2$" Then Sheets("Start").Select
Exit Sub
End Sub
And I have another macro (call ADDNumLine) that add additional data to the Sheet1. How do I temporally disable the Private Sub above when executing Macro AddNumLine?
View 9 Replies
View Related
Jan 11, 2007
I have a set of procedures that require auto recalc to be on to work correctly. I've tried application.volatile and Application.CalculateFull with no luck. I'm trying to put together code that makes sure recalc is on, but that first determines the current recalc status and then changes it back to Manual when necessary. I don't know how to determine the current status. The following code should work if the red sections are fixed.
Sub TempAuto()
Dim CurrentState As unknown
CurrentState = Application.Calculation status
Application.Calculation = xlAutomatic
If CurrentState = Manual Then
Application.Calculation = xlManual
End If
End Sub
View 8 Replies
View Related
Jun 14, 2008
I would like to run a macro on a worksheet that changes some cell values. Some of these cells have conditional formatting applied. With this particular macro I do not want Excel's Conditional formatting to react to these changes. How can I temporarily switch off Excel’s Conditional Formatting with VBA before I run the macro so that it doesn't react to these changes? What exactly triggers conditional Formatting to re-calculate?
View 2 Replies
View Related
Feb 3, 2014
I have downloaded some of my bank statements in excel format but they are just static data - ie, they are just numbers in boxes and the BALANCE column does not react when I take out a transaction.
I have put in a formula for the BALANCE column so it does now take its value from the previous day plus or minus transactions, but now I want to do additional things.
- How would I, for example, categorise several transactions as "HOLIDAY" [URL] ....... and then temporarily make them disappear so that I can see the effect of that on my balance? I can see how to hide/unhide transactions but that doesn't actually seem to have any impact on the balance column.
- Second query: how do I make my current spreadsheet a template so that when I download the next bunch of bank statements I can just apply all the formulae in this one to it?
View 1 Replies
View Related
Nov 9, 2011
How to temporarily disable PowerPoint charts which are linked to Excel. The problem is, whenever I copy a slide and try to paste it elsewhere, Office attempts to update all of the links in the entire PowerPoint. Since the slide deck has so many links, this takes an awful lot of time to do. I don't want to break the links completely as I would lose any ability to keep them dynamic. I've checked all of the advanced options within PowerPoint, but cannot find any way to temporarily disable links from updating.
View 1 Replies
View Related
Oct 25, 2011
I have a simple macro that cycles through the sheets in a workbook, and if the sheet's codename matches one of a defined list, some of its data is added to a summary sheet.
The macro works exactly as intended, but a strange thing happened yesterday: some data was missing from the summary sheet because one of the sheets was being ignored. This sheet is named 'MCP' on its tab, and has codename Sheet8.
Here's the strange part: on stepping through the code, cycling the sheets, I noticed that the sheet icon, name and codename had disappeared from the Microsoft Excel Objects folder in the Project Explorer. When the loop got to the sheet in question
Code:
For Each ws In ThisWorkbook.Worksheets
Debug.Print ws.Name
Debug.Print ws.Codename
The above code displayed its name (correctly) as 'MCP', but its codename was blank; the sheet was therefore skipped by the code because the codename had to match against a defined list.
While I was pondering this, and doing some web searches, the sheet then re-appeared in the Project Explorer and everything worked again.
My question is this: is it likely to be due to the workbook being shared? I know that workbook sharing in Excel is often discouraged, but this is a simple workbook only used by a maximum of three users (two of these had the workbook open at the time the issue was reported)
I've changed the code so that the sheet name is inspected in the event that the codename is blank, which should guard against the issue provided sheets are not deleted/renamed.
Windows XP, Excel 2003
View 4 Replies
View Related
May 12, 2014
I would like to know the easiest way to temporarily keep a worksheet code from running while I am editing, then turn it back on when I am done. I was thinking a button with these commands(?)>
Application.ScreenUpdating = False
Application.EnableEvents = True
but I don't know which button to use, or if I would need a button for each.
View 2 Replies
View Related
Mar 27, 2009
Is there a way to write a Worksheet_SelectionChange (ByVal Target As Range) event in module after creating a sheet in VBA? I constantly delete a sheet, then repopulate it with a new one that is empty, but I need to add some code that happens if they should change a particular cell. It worked when I ran it on a worksheet without refreshing, but as soon as I cleared and repopulated the sheet, it was gone. Is there a way to preserve this?
View 9 Replies
View Related
Aug 7, 2006
I have the following code, which works perfectly:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TotalDays As Integer
TotalDays = Range("C65536").End(xlUp).Row + 1
The code points to the next blank cell so the user can input a value. Each time the user enters a value I want to re-run the code so that the colour of the cell changes.
However I also want to perform various calculations on the sheet. However this means the sheet is being changed and so continually repeats my code.
How do I add the following, to my previous code?
Range("E8").Value = Cells(7, 6) * 2.5
View 9 Replies
View Related
Apr 9, 2014
I have a spreadsheet where I want to require certain fields to be completed then I want to have that file auto emailed. I have learned that I do need to have the file saved before sending otherwise the data will not appear in the email, so with this I want to have the file temporarily saved emailed then the temp file deleted.
Here is the code I have so far but it errors on the blue text, I did change the TempFileName from = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss") to = [C16] & "_" & [B6] & "_" & [D6]
Private Sub CommandButton1_Click()
If Range("B6").Value = "" Or _
Range("d6").Value = "" Or _
Range("f6").Value = "" Or _
Range("E9").Value = "" Or _
[Code] ......
View 1 Replies
View Related
Aug 5, 2014
Looking for the syntax that will allow me to code an event sub routine, based off the event of a specific function e.g. findnum being run.
View 14 Replies
View Related
Dec 14, 2009
What would be the name of the event where if I select a particular cell in Sheet1 it triggers something in say Sheet2?
View 9 Replies
View Related
Oct 24, 2009
Working in Excel 2003. I have a VBA code that, if a particular option is chosen from a drop down box, then a message box appears. What I'd like to do is alter this code so that if cell J5 has "Text 1", "Text 2", or "Text 3" then the message box does not appear. Here's my
View 3 Replies
View Related
Dec 11, 2007
I've created a macro with a custom dialog box, but I don't know how to make the transition from when I make the dialog box pop up, the user enters the information, then they click "Continue" or "Cancel" or whatever it may be, how to do I make it happen from there out?
Do I make the command buttons a boolean and if they click it's true? How do I make it work?
View 14 Replies
View Related
Apr 19, 2009
I have a user input box (VBA) with two columns of data entry. The leftmost column has text boxes labeled color1, color2, color3, etc.. The rightmost column has text boxes labeled tag1, tag2, tag3, etc..
I have the TAB sequence set to go from color1 to tag1, color2 to tag2, color3to tag3, etc..
A user can inadvertently tab over the color1 (or color2, etc. columns) into the tag1 (or tag 2, etc. columns) column without entering data in the color column.
Is there coding to allow a TAB key entry to be a Change Event such that, if a user TABS out of color1 without entering data, a MsgBox could signal that they must enter data in the color1 field before they can continue?
Alternately, can you suggest a different approach? The goal is to require an entry in the leftmost column (color1) before they can proceed to the tag1 field. Of course, they are given a "Cancel" option.
View 7 Replies
View Related
Dec 8, 2009
I have a hyperlink within Sheet1 (Functionalities) of my workbook that looks like this: ...
View 13 Replies
View Related
Dec 12, 2011
I have a worksheet used for scheduling. When a members time is updated, it updates the counting cell for that time by subtracting 1 (thats simplified, the forumla is more complex than that).
I have five teams and five workbooks for each team to do it's own scheduling. In just ONE workbook, the Worksheet_Change() event has stopped executing. It's fine in the others. I renamed the workbook to archive it then put another workbook in it's place and now that one works just fine.
The workbook that I've archived, I hate doing that not knowing what would cause the Worksheet_Change() to stop being recognized. There is no code on the sheet or related to the sheet that would stop it or cause events to be cancelled.
I wanted to know if there is some secret keystroke combination that may have been inadvertently clicked that would cause events to firing or stop being recognized?
View 4 Replies
View Related
Apr 28, 2014
I have a table on excel that I would like to have an event calculated by the hour and would like to know how to, ex:
1900
2000
2100
2300
00-0100
0
1
0
2
0
that above is where I want the formula to calculate the following:
Activiy 1
2015
Activity 2
2310
Activity 3
2348
Also I would like to do something similar like that but for age, ex:
18-24
3
25-40
1
41-59
0
[code].....
View 8 Replies
View Related
Dec 10, 2006
I need to have a check box, that when it is checked the user must fill in a cell.
View 9 Replies
View Related
Dec 31, 2006
I have two workbooks that have the following
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColor As Integer
With Target
If Intersect(.Cells, Range("v:v")) Is Nothing Then Exit Sub
If IsEmpty(.Cells) Then r.Offset(, 1).Interior.ColorIndex = xlNone: Exit Sub
If Not IsDate(.Cells) Then r.Offset(, 1).Interior.ColorIndex = xlNone: Exit Sub
Select Case Month(.Value)
Case 1: myColor = 3
Case 2: myColor = 17
Case 3: myColor = 19
Case 4: myColor = 22
Case 5: myColor = 26
Case 6: myColor = 33
Case 7: myColor = 36
Case 8: myColor = 38
Case 9: myColor = 40
Case 10: myColor = 42
Case 11: myColor = 44
Case 12: myColor = 7
I have this code in 1 sheet in one of the books (and all other sheets work fine), and the same code in all sheets in the other book. Both books work the way it's supposed to.
My question,
Is it necessary to have the Worksheet_Change event in all the sheets (all sheets act on the code the same way) or is it okay for just one sheet?
Could I encounter a problem if in only one sheet?
I just don't see why I would have to add more size with the code in all sheets if it is not necessary.
View 9 Replies
View Related
Jan 6, 2008
I found this code on one of my many searches, that works great.
(can't remember where I got it or who wrote it, (My deepest apoligies to the author))
Public pRule
Sub butRulerToggle_Click()
pRule = Not pRule
Selection.Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If pRule Then
For Each aCell In ActiveSheet.UsedRange
If aCell.Interior.ColorIndex = 27 Then aCell.Interior.ColorIndex = xlNone
Next
On Error Resume Next
For Each aCell In Application.Intersect(ActiveCell.EntireRow.Cells, ActiveSheet.UsedRange)
If aCell.Interior.ColorIndex = xlNone Then aCell.Interior.ColorIndex = 27
Next
End If
End Sub
My question:
This works in a sheet module. How can I put it in the This Workbook module so it works on all sheets.
By the way, what this does is highlight the whole row on a clik of a cell, leaving any color formating that was initially there alone.
Very useful if you are looking at say A10 and then want to look at Z10 without losing focus on the row.
View 9 Replies
View Related