Macro Causes Screen To Flash

Jun 9, 2006

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.

Sub PrintContrReview_Click()
ActiveSheet.PageSetup.PrintArea = "$Y$5:$Z$20"
With ActiveSheet.PageSetup
.LeftHeader = "&F"
.RightHeader = "&A &D"
.LeftMargin = Application.InchesToPoints(1.25)
.Zoom = 95

End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub

So what is the cause of the flash and the delay, and how do I eliminate them?

View 7 Replies


ADVERTISEMENT

Macro Adds A Bar On The Screen

Oct 10, 2008

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.

View 9 Replies View Related

Macro To Print Screen

May 27, 2009

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.

View 9 Replies View Related

Splash Screen While Macro Runs?

Sep 24, 2009

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...

View 9 Replies View Related

Screen Flashing When Running VBA Macro

Jan 4, 2010

I have a VBA macro that sort several worksheets during th e processing but the screen flashes it move between worksheets. I would like to be able to just show a messae or have the display stay on the strting worksheet

View 9 Replies View Related

Stop Macro Flashing Screen

May 21, 2008

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.

View 2 Replies View Related

Beep & Flash

Feb 27, 2007

I am trying to have a number if >10 "Flash" and "Beep".

I can not get it to both.

The first code is in a "Module" and the second code is in the "Sheet Code".

Option Explicit

Sub Wait(tSecs As Single)
' Timer to create a pause
Dim sngSec As Single

sngSec = Timer + tSecs
Do While Timer < sngSec
DoEvents
Loop
End Sub

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Integer
If Target.Address "$A$1" Then Exit Sub
If Target.Value > 10 Then
For x = 1 To 5

View 9 Replies View Related

Splash Screen - How To Display While Macro Runs

Sep 27, 2011

I have a splash screen I want to display while a macro runs. I've created all the necessary code based on information from this site but have a question about where to actually put the code as all the example I've seen are based on workbook open events.

I tried placing my code

UserForm1.Show

with in the macro I waned the splash screen to be displayed during but that doesn't work. Well, it does, but not as I intended. The splash screen pops up for the specified duration as part of the macro stopping the macro, then closes and the rest of the macro finishes running.

Do i need to call the splash screen from a certain point in the macro I wish it to be displayed during? I dont want the macro to stop running while the splash screen is showing.

View 1 Replies View Related

Stop Screen From Jumping While Running Macro

Apr 25, 2007

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?

View 4 Replies View Related

Application Onkey: Prevent Users From Using The Print Screen Or The Alt Print Screen Buttons On The Keyboard

Dec 29, 2009

I'm just looking to prevent users from using the print screen or the alt print screen buttons on the keyboard. I have this script that works if I use "39" (Right Arrow)but wont work if I use "42" (Print Screen Button).

View 5 Replies View Related

Flash Game Not Working

Apr 20, 2009

when I am trying to open them. they are not opening. When opening excel with flash game, there is big black square box. When opening power point with flash game, it is giving error "Some controls on this presentation can't be activated. They might mot be registered on this computer"

Flash objects on by browser when surfing site are working perfectly fine. i have also re-installed fresh flash from adobe site, but no success.

View 4 Replies View Related

Save To Flash Drive?

May 18, 2012

I have a an excel workbook that is distributed on a flash drive. Currently a Save As Macro copies "A1" as the file name and then opens a screen to allows the user to save that filename to a location that the user selects. What I would like to have happen is for a command button to start a macro that would automatically save the file back to the flash drive that the master workbook is located.

View 3 Replies View Related

Make Button Flash

Dec 1, 2006

I have a command button that I want to appear to be flashing (by continually changing the button's font colour text) which a user can click at any time. I can (almost) do this now by using 'Application.Wait Now + TimeValue', but this doesn't allow the user to click the button until the code has finished running.

View 3 Replies View Related

Make Cells Flash

Dec 6, 2007

I would like the VBA code and use instruction, which will make any cell flash in a predetermined range of cells when certain conditions are met i.e. if cell value greater than 10 or less than 100 - usual condition formatting rules.

View 8 Replies View Related

Cell Flash With Conditional Formatting

Nov 25, 2011

I'm working for monitoring report with macro , i have collected the details from database and displayed it second sheet of excel. i have put on conditions in macro like if particular cell value > 90 the cell will be display "Red" text and conditional formating will make background color as red. now i want to flash or blink the particular red colored cell continuously... if amber/green color it should not blink.

View 5 Replies View Related

Downloading Data From Flash Content

Mar 17, 2013

Is it possible to access data from flash content using excel?

The data I am looking for can be found by navigating to this link: [URL] ..., selecting one of the live games by clicking on the names of the teams, then clicking on the statistics tab on the next page.

The data I'm looking to extract is the shots data, i.e. shots on target, shots off target and shots on woodwork, plus the current score.

View 4 Replies View Related

Make A Cell Flash Or Blink

Oct 5, 2007

Is there a Vba method that will make a cell flash

View 9 Replies View Related

Cell To Flash And Play A Sound

Feb 5, 2010

What I want to achieve is for say if the value in cell A1 equals the value in cell B1, then cell A1 to flash a background colour (eg. red), and also play a sound. I assume this can only be achieved using VBA, of which I am not conversant with. I am searching the forum for answers, but not yet found one that addresses my problem exactly (being a complete VBA newbie). In the meantime if some could assist please or point me to a thread that addresses this query.

View 9 Replies View Related

Insert SWF (flash) File Into Spreadsheet

Jun 21, 2006

Can it be done? Example posted. How was the SWF file inserted into Excel?
Link to the file is at: http://www.onlinebookforsale.com/swfinexcel.xls

View 2 Replies View Related

Show Flash .swf File On Userform

Nov 20, 2007

Private Sub CommandButton1_Click()
Call ShockwaveFlash1.SetVariable("testVar", "Message B")
'This sets the _ value of the variable in the Flash Project.
End Sub

Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)
Text1.Text = args
'this catches the action sent by Flash, and uses it in the TextBox.
End Sub

Private Sub UserForm_Activate()
Call ShockwaveFlash1.LoadMovie(0, CurDir + "/vbSample.swf")
'This loads the movie that was made into level 0 of the project.
End Sub

(I got from this link http://www.kirupa.com/developer/mx/flashvb.htm) As you can see I have adapted it to work in Excel 2007. Now - when i first run it - the flash file loads and shows in the userform. The only nag being that the .swf file doesnt pass the text into the textbox on the userform. But once i exit the Excel workbook and reload it - the .swf file doesnt show up at all no matter what i do.

View 4 Replies View Related

Embed Flash File In Worksheet

Mar 29, 2008

How do you embed a flash file into excel 2003?

And is it userfriendly? For users to use the excel file, they must have flash software installed right?

View 5 Replies View Related

Making Msgbox Text Flash / Blink In VBA?

Jan 26, 2014

How would I make a msgbox text flash/ blinks in VBA? Is there a way to make the msgbox flash/blinks as well?

View 1 Replies View Related

Flash Destination Cells When Hyperlink Clicked

Mar 27, 2014

I need vba code to flash the destination cells when hyperlink is clicked.......

View 3 Replies View Related

Moving Text In A Cell Similar To News Flash

Apr 27, 2009

Can I have text moving in a cell similar to a news flash.

View 3 Replies View Related

2003 Is Too Far Up On The Screen

Sep 27, 2009

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?

View 4 Replies View Related

Screen Size

Dec 7, 2009

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?

View 14 Replies View Related

Screen Position

Aug 18, 2009

I would like to end a macro with a specific cell (e.g. E50) in the first cell in the upper left hand corner of the screen. How might I accomplish this?

View 3 Replies View Related

Can't Get Screen To Go All Way To Top Of Page

Nov 21, 2011

I cant get my screen to go all the way to the top of the page! & there is a 2 inch or so area at the bottom of the worksheet as well. I need to get my display back to normal!

View 4 Replies View Related

Print Screen

Jul 6, 2007

macro minimizes excel takes a print screen of the application behind excel then pastes it in a word document then maximizes excel screen again

View 9 Replies View Related

Splash Screen

Nov 22, 2008

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?

View 9 Replies View Related







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