LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ScreenUpdating function not working?

I'm using Office 2003 on Win XP Pro SP2, Dell PC. I have the following vba
script in a spreadsheet, and I want to hide all the activity.. but the
ScreenUpdating function doesn't seem to be hiding anything, tons of stuff
still shows on screen. (Note: I just added in all the comments to this
screen for readability, in my code they aren't there.) And please don't
laugh that I'm using SendKeys statements, it was quick and I'm not a
programmer. Thanks.
-----------------------------------------

Private Sub cmdApp_Click()

' Turn off Screen Updating
Application.ScreenUpdating = False

' Unprotect the worksheet
Excel.SendKeys ("%(t)")
Excel.SendKeys ("p")
Excel.SendKeys ("p")
Excel.SendKeys ("excel")
Excel.SendKeys ("{ENTER}")

' Goto Cell A22
Excel.SendKeys ("{F5}")
Excel.SendKeys ("{DELETE}")
Excel.SendKeys ("A22")
Excel.SendKeys ("{ENTER}")

' Select current row and next 7 rows
Excel.SendKeys ("+({DOWN 7})")

' Insert a bunch of rows
Excel.SendKeys ("%(i)")
Excel.SendKeys ("r")

' Move cursor down 1 row
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re12.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re3.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re12.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re3.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re12.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re12.75{ENTER}")
Excel.SendKeys ("{DOWN}")

' Format row height then go to next row
Excel.SendKeys ("%(o)re2.50{ENTER}")
Excel.SendKeys ("{DOWN}")

' Insert another row
Excel.SendKeys ("%(i)")
Excel.SendKeys ("r")

' Move cursor two cells to the right
Excel.SendKeys ("{RIGHT 2}")

' Select 6 columns wide (blank row that was just inserted)
Excel.SendKeys ("+({RIGHT 6})")

' Format cell pattern to be solid black
Excel.SendKeys ("%(o)ebp{TAB}{DOWN}{ENTER}{TAB 2}{ENTER}")

' Go down two rows
Excel.SendKeys ("{DOWN 2}")

' Select 3 columns and 4 rows
Excel.SendKeys ("+({RIGHT 3}{DOWN 4})")

' Copy selected rows
Excel.SendKeys ("^(c)")

' Move curser up 9 rows
Excel.SendKeys ("{UP 9}")

' Paste rows from previous copy then ESC out of copy sequence
Excel.SendKeys ("^(v)")
Excel.SendKeys ("{ESC}")

' Move right one cell, delete its contents
Excel.SendKeys ("{RIGHT}")
Excel.SendKeys ("{DELETE}")

' Move right two cells, delete its contents
Excel.SendKeys ("{RIGHT 2}")
Excel.SendKeys ("{DELETE}")

' Move down 2 and left 1 cell, delete its contents
Excel.SendKeys ("{DOWN 2}{LEFT}{DELETE}")

' Move down 2 cells, delete its contents
Excel.SendKeys ("{DOWN 2}{DELETE}")

' Move up 4 cells and left 1 cell
Excel.SendKeys ("{UP 4}{LEFT}")

' Re-protect the worksheet
Excel.SendKeys ("%(t)pp")
Excel.SendKeys ("excel")
Excel.SendKeys ("{ENTER}")
Excel.SendKeys ("excel")
Excel.SendKeys ("{ENTER}")

' Turn Screen Updating back on
Application.ScreenUpdating = True

End Sub

~ Paul

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
screenupdating = false not working in Workbook_open sub TommySzalapski[_29_] Excel Programming 6 August 2nd 05 10:52 PM
Application.ScreenUpdating function question Fleone Excel Worksheet Functions 2 May 12th 05 01:36 AM
Application.screenupdating is not working in Excel 2002 though it. vispnair Excel Programming 2 November 18th 04 01:11 PM
Application.Screenupdating not "always" working? Joe 90 Excel Programming 10 September 29th 03 09:16 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"