How To Stop Screen Flickering
i have an excel with two sheets containing both formula and vba code... but it will flicker when i click every command button? how will i stop flickering?
View Complete Thread with Replies
Related Forum Messages:
Screen Flickering With ScreenUpdating Set To FALSE
trying to copy both the values and the format of a certain range from one worksheet to another I am faced with two problems:
a) how can I copy something without having to previously add ".select"? (in the end I want to avoid any screen flickering)
b) how can I copy both the values and the format in one line (currently I have to use two lines)
Below you can find a code snippet which is repitetiously launched in order to copy data(+format) from many sheets to one sheet, there is other code as well (not shown here), which is launched in between (dealing with charts and pictures). In order to avoid some screen flickering I have already included the "screenupdating=false" line, and I would like to drop the usage of any ".select" in my code, as any ".select" seems to update the screen irrespectively of "application.screenupdating=false" or not.
However, as soon as I erase any ".select" command, I get a runtime-error 1004 at the SECOND run of this code snippet here. The only way to circumvent this seems to include ".select" prior to the line causing the error. Why at the second run? Well, I think, it is because after the second run, the focus might remain with a chart and not anylonger at any cell. Is there any way executing the below code without the screen-flickering?
Sub copySample(ByVal M As Integer)
Dim wksTarget As worksheet, wksNow As Worksheet
columnNow = ((m-1)*8)+1
Stop Macro Flashing Screen
I have attached macro code, which populates a three page template and clears the contents, so that the process can be repeated. I would like to stream line the macro which populates the template - currently there is alot of screen flickering back and forth between worksheets.
Stop Screen From Jumping While Running Macro
I've created a macro that runs for about 3 seconds. While the macro runs, the active worksheet display jumps around because of the various cell references being addressed in the macro.
Is there a way to stop the jumping around? How can a simple "Progress" screen be displayed while the macro is running?
I have lots of charts in a sheet "plots" which is based on data in sheet "data Summary". Sheet "plots" have the following code, which is based on the event "actiavte". At the end my main macro, I am activating sheet "plots" and all the charts are working fine. After this if I go to any other sheet in the workbook and come back to "plots", all the charts are flickering and the cursor turns to busy mode. I don't understnad why this is happening.
Private Sub Worksheet_Activate()
For Each ChtOb In ActiveSheet.ChartObjects
ChtOb.Chart.PlotVisibleOnly = False
On Error GoTo Handle
With ActiveSheet.ChartObjects("s21max").Chart.Axes(xlCategory, xlSecondary)
.MinimumScale = Application.Average([s21high]) + -4 * Application.StDev([s21high])
.MaximumScale = Application.Average([s21high]) + 4 * Application.StDev([s21high]) + Application.StDev([s21high]) * 0.25
.CrossesAt = .MinimumScale..........................
Sheets Are Flickering Even No Macro Running
Some of my sheets are flickering even when there is no macro running. It blinks and flashes from time to time. It does not affect the funktion in the sheet except that its annoying as hell. Some times I have to scroll down and back up to "clear" the screen from the flicker/flash effects.
I can open an old file fresh and it flickers and flashes from start. It doesnt matter if I start it with or with out macro activated.
I have a large workbook with about 20 worksheets that I have used for several years without problems. Recently, I have been getting strange behavior when the screen refreshes. The biggest problem is that I get images of other worksheets covering my current worksheet when I change a cell. I can make them go away by scrolling or flipping between another worksheet and back. I have tried using manual recalc and this has helped somewhat but I can still get the images sometimes. The workbook contains VBA that performs various tasks on every worksheet (unlock, update pivots...) but these have been in there forever. There is also one piece of code that performs advanced filtering. I can only think there was something changed with a security patch, but I wanted to know if anyone else has had this issue and might be able to provide some advice on how to prevent it.
Is there a way to disable updating to the screen but have a message displayed to the user while a macro is running? Something like a userform displayed on the screen or a message in the status bar. I vaguley remember you could "print" message to the status bar in LotusScript, wondering if there is something similar in Excel.
Application.ScreenUpdating = False
"the macro is running, hang tight"
...macro code in here...
Application.ScreenUpdating = True
I have never created a splash screen and would like to do so now, I am in the VB editor, i have inserted a userform, i would like to insert my company logo on to the userform, how do i do this?
what size monitor do you use?
I'm thinking about upgrading my 17" to a 23" monitor so I can see more cells without zooming
Anyone currently use a 23" for Excel?
2003 Is Too Far Up On The Screen
I did the restart our company required and when Excel reopened it was on my laptop rather than the big screen. I run 2 screens. Excel 2003 is now so far up on the laptop screen, I cannot move it. I can barely see File, Edit, View, etc. How can I drag Excel down so I can resize it?
Screen Graph Not Updating
The following short macro moves data into an area from where a series of graphs can either be displayed on the screen or printed. It may not be the most elegant of code and the way in which I "jump" around the hard copy option may raise some eyebrows, however except for what follows, it generally works.
When the "S"creen option is taken only the first graph is displayed, subsequent ones are not shown, (the screen does not refresh). What do I need to add to the coding to ensure each graph is shown? .....
Use Userform Password Screen
I have a UserForm that I want to use as a Password screen
The form has a label, CommandButton and TextBox.
When I run the UserForm, IF you click OK without entering the Password, you still gain access to the Workbook!
IF you type in the wrong Password you still gain access to the Workbook and NO "Invalid password!" message pops up.
What I would like to happen IF the CommandButton is clicked without entering the Password, is for the Workbook to close, and IF the Password is correct, I want to load Useform2
I am using the following code provided by rorya, that I got from here.....
Private Sub CommandButton1_Click()
Private Sub UserForm_Initialize()
Me.TextBox1.PasswordChar = "*"
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Dim frm As UserForm3
Set frm = New UserForm3
If frm.TextBox1.Text = "Password" Then
' run your code
MsgBox "Invalid password!"
Stopping Screen Movement
A good number of years ago I used a line of code at the beginning and the end of a macro to keep the spreadsheet from moving until the macro was finished. At the close it moved if a movement was necessary.
Screen Movement With Macros
I've made quite a few programs I use in excel and have wondered about this for awhile.
When you run a macro that selects cells and objects off screen or on other sheets, the screen moves to those places. Is there anyway to lock the sheet so this doesn't happen and things look a bit more professional ?
What I Print Looks Different From What My Screen Shows
I have a WYSIWYG problem: what I see on the screen is NOT what I get out of the print job.
I commonly have the problem when working with Excel objects (any kind of shape, text box, line, graph) in that the layout looks great on the tab that I created, but when I go into PrintPreview or actually print it out, the shapes don't quite align with what I had built in the tab. Where I thought I had lines joining, the print out shows them crossing at other points. If I then go back to the tab and look at the layout on the regular screen, it looks fine.
This problem can be easily understood if you try to create a triangle by drawing three lines (non-overlapping lines that cross only at the vertices). Note that the lines either prematurely cross, or don't intersect at all when you print it out.
THis problem is even magnified when using the camera function to take a "snapshot" of a graph or other objects. In fact, it has the tendency to even "mess up" the graph's formatting, regarding the arrangement of titles and axes (often making them overlap).
Macro To Print Screen
Is there a feature or VB code that will take a screen shot in excel for the sheet that I have active?
What I would like to do is run a macro that does a few things, then takes a screen shot and bundles it up in an email to send (Outlook on Exchange). Since the report is 30 MB it cannot be emailed and taking the time to compose a report w/screen shot takes too much time.
Screen Updating Dilemma
I have a personal.xls macro that basically does a comparison of two different workbooks. One of these workbooks ihas it's own macros (which are there in case the user wants to run them separately)...anyways my main macro calls these other macros one at a time.
It seems that at each call, the screen updates, alternating sheets and/or workbooks....
I know about the Application.Screenupdating=True / False statements....but I am not sure where I should be putting them to get the whole thing to work seamlessly.... I tried them at the start and end of my main macro, but that doesn't do the job.
Full Screen Crosshair
This is a simple fine line crosshair which ALWAYS extends the full screen width and height. Excel users seem to be stuck with the little box cross. A full screen crosshair for Excel would allow one to instantly and easily see which row and column the cursor is on without clicking a cell or following from the cursor to the row/column with your finger on the screen. It may seem trivial, but once you have used a full screen crosshair, you just don't know what you've been missing.
Blank Screen Background
I use a number of user forms and would like to dsplay them with a blank background ie not over the top of the spreadsheet. The colour of a blank userform would be nice! I do not want to make them the size of the screen.
Repositioning Splash Screen
I cooked up a nice little splash screen using a user form. It seems to be left of center on the screen when it pops up. Is there a way to set the x and y coordinates to 'place' the splash where I want it to go?
Move Shape Across Screen
I'm trying to write some VB to draw a line shape and then move it across the screen. I have managed to draw the line and have used the following code to move it:
Set linetest = ActiveSheet.Shapes(1)
For iCount=1 To 100
linetest.Left = linetest.Left + 1
linetest.Top = linetest.Top + 1
i) I can only actually see the line move if I run the code using the debugger and step through the loop. If I just run the code then I only see the end position of the line (note, this is not an issue with the calculation being too fast for Excel to display the line. I tried the code with a delay loop in it and it made no difference). I can get it to work by calculating the active sheet for each iteration of the loop, but this means I have no control over the speed of the movement; incidentally it moves very slowly).
ii) This seems a poor way to move the line. Is there anyway to move the start and end node of the line rather than using the left, top, width and height properties (i.e. can I get the old coordinates of the points and set them to different numbers)?
Macro Causes Screen To Flash
I created a macro, assigned to a menu button, that selects and prints a range on the active sheet. I created the macro with the recorder, then edited it to eliminate the excess. When I run the macro, though, it takes up to ten seconds to print the page and the screen flashes repeatedly while it's running. I also noticed that the length of the delay and the number of flashes seems to be related to the number of lines of code, because the delay was much longer and the flashing more excessive before editing.
ActiveSheet.PageSetup.PrintArea = "$Y$5:$Z$20"
.LeftHeader = "&F"
.RightHeader = "&A &D"
.LeftMargin = Application.InchesToPoints(1.25)
.Zoom = 95
So what is the cause of the flash and the delay, and how do I eliminate them?
Lunch Screen Saver
i am trying to lunch screensaver using this code, which worked with Excel 2003, but not with Excel 2007 which i am using at the moment. when excution comes 2 :
VBA.Shell "C:WINDOWSsystem32ss3dfo.scr /S", vbMaximizedFocus
it tells file not found. any idea how 2 make it work in Excel 2007 ?
'*To show the screen saver
VBA.Shell "C:WINDOWSsystem32ss3dfo.scr /S", vbMaximizedFocus
Controlling Screen Flashing Using LockWindowUpdate
A while back I was assisted with trying to prevent excessive screen flashing...
I was originally using the Application.ScreenUpdating=False method...but it was still a little jumpy... so Richard Schollar (a valued member in our forum) helped me with this code and it seemed to work...
Now I am trying to apply it again to another macro and it is not working so well. The thing I found is that on some people's computers it does work well, but not on mine.
Does anyone know why that is and how I can fix it so it doesn't flash on mine either?
Splash Screen While Macro Runs?
I searched for this and found a few examples on splash screens, but if someone could help I would appreciate it.
Basically I have this massive macro that runs, I recorded some of it, and VBA the rest. It does a bunch of things like bringing in different spreadsheets, formatting vlookups blah blah blah... Anyway for a nice touch I was hoping that I could get a splash screen or something that will run while this macro is running in the background. How hard would this be? The macro is button driven...
Macro Adds A Bar On The Screen
I have a macro launched from a command button that sometimes puts a bar at the left side of the window. When it executes the line Sheets("graph").Select the first line in the macro it puts the bar at the right side of the window. The characteristics of the bar are:
1) It is associated with the main excel window - if you minimize the window containing the worsheet the bar is still visible
2) It is one of two widths, about 1/4" or about 2.5"
3) If you move an Excel toolbar to the left side of the screen the bar disappears. If you move the toolbar back to the top of the page it doesn't return but it can appear the next time you run the macro.
4) It only appears some times you run the macro - I can go days without seeing this problem and then it happens every time I run the macro.
Screen Updating & Icolor
i have a code (Below) using icolor that changes the colour of the cell depending on critiria, the problem i have is when i input into the sheet using a drop down box the color remains the same, without a drop down box it works but i really need to to work with the drop down boxes,
Stuck In Full Screen Mode
I seem to be stuck in "Full Screen" mode. When I go to the View menu, both "Full Screen" and "Normal" are highlighted. I can't seem to get out of Full Screen.
I am using Excel 2003, XP SP3 installed. This just started this am. I did download and install Microsoft patches this am. ???
I am able to save and use Excel but without normal view my formating buttons etc. are not available.
VBA: Using SendKeys To Print The Screen
I would like to emulate hitting the Alt+Ctrl+"Print Screen" button on the keyboard with the following code. I know there are some restrictions around using the PrintScreen with the SendKeys, but I'm hoping I can still figure out how to make this work.
Following is the first part of a larger macro I've set up. If I can just get this to work, that would be perfect.
Application.SendKeys "^%" & "PRTSC"
Screen Updating Double False
I have now seen a few codes, both from my instructor and on the web that is using code like this;
Application.ScreenUpdating = False
...... CODE HERE .....
Application.ScreenUpdating = False
Would there be any reason to this madness. Can't see why you wouldn't set it back to true and absolutly no reason to double false it?
Workbook No Longer Fits Screen
I've tried the F1 Help screens and searched the board with nothing that applys to my problem popping up.
I have several Workbooks that I use regularly. Without making any changes that I know of, recently several of the workbooks began opening too long and a little off to the right.
I can grab the top header and move them back to the left but I have no visible bottom slider bar and the side slider bar when at the lowest point that I can pull it down to is about 1000 rows from the last entry. I have other Workbooks that are working perfectly. Its like my Monitor needs to be two inches taller.
I have checked View settings -- Format Settings -- Resizing and all other things that I can think of, all to no avail.
Using Control G and trying to mentally keep track of my current last line number to enter a new row is really getting Old.
An Object Code= Flickers The Screen
way i could stop my sheet from flickering everytime i change my cell selection via keyboard/mouse. i checked and this problem is only with code below that i run in view code of my sheet...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
On Error GoTo errHandler
If Target.Count > 1 Then GoTo exitHandler
If Target.Address(False, False) = "Z3" Then
Splash Screen Do Not Show Again Checkbox
I have a SplashScreen that is activated in the ‘Workbook_Open ‘ Event.
A CheckboxControl on the SplashScreen allows a user to disregard the screen the next time the workbook is opened.
Private Sub Splash_Screen_Activate()
If Splash_Screen.ckbx_StopSplashScreen.Value = True Then
If Splash_Screen.ckbx_StopSplashScreen = False Then
Unfortunatley my code is not working. I was hoping for some insight into making this work. Mind you, I’m a cut and paste VBA type of person, but I do understand the concepts enough to work with it.
1.What is the proper method for coding this?
2.Which location would this code be placed – the Form itself or a Module?
3.How and where do you store the CheckBox Value to be used the next time the Workbook is opened?
Additional Tabs At The Bottom Of The Screen
So we created a workbook that has lots of worksheets inside it. The problem is due to the high number of worksheets there are alot of tabs along the bottom. Many of the tabs are hidden behind the scroll bar. Is it possible to have 2 rows of tabs at the bottom of the screen?
Turn Of Alerts And Screen Updating
Using the following to open a sheet
Workbooks.Open Filename:=ActiveWorkbook.Path & "" & "Sheet 1.xls"
Application.ScreenUpdating = False
Application.DisplayAlerts = False
I still however get a promt asking me if I want to update, and a message if i want to save the changes when I close
How do I turn of these alerts.