Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Excel 2007 VBA/Vista - How do I deselect a selection programmatica

I have read some suggestions to use:
"Application.CutCopyMode = False"
but am leery of using that because "False" is not a valid value for CutCopy,
only "XLCopy" and "XLCut" are.
--
TomThumb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel 2007 VBA/Vista - How do I deselect a selection programmatica

It is a valid selection. Millions use it successfully.

--
Regards,
Tom Ogilvy


"TomThumb" wrote:

I have read some suggestions to use:
"Application.CutCopyMode = False"
but am leery of using that because "False" is not a valid value for CutCopy,
only "XLCopy" and "XLCut" are.
--
TomThumb

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Excel 2007 VBA/Vista - How do I deselect a selection programma

Thank you, Tom. I thought I needed to deselect to solve my problem, but I
still have my problem even after CutCopy=False.

My real problem is that I want to change the colors of two CommandButtons
immediately. One of my procedures (A), changes one button as desired. The
other(B), is delayed until some other procedures have finished. The main
difference in the two procedures is that the procedure causing the delayed
color change(B), uses an integer on the spreadsheet.

I believe I am using Application.ScreenUpdating properly.

The problem is that both procedures succeed on the second and subsequent
uses. Furthermore, if I follow a double-success with with a single click
anywhere on the spreadsheet, I get one success and the other (the same
procedure B) delayed. Any Ideas?
--
TomThumb


"Tom Ogilvy" wrote:

It is a valid selection. Millions use it successfully.

--
Regards,
Tom Ogilvy


"TomThumb" wrote:

I have read some suggestions to use:
"Application.CutCopyMode = False"
but am leery of using that because "False" is not a valid value for CutCopy,
only "XLCopy" and "XLCut" are.
--
TomThumb

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel 2007 VBA/Vista - How do I deselect a selection programma

possibly

Code to change the color
Application.ScreenUpdating = false
Application.ScreenUpdating = True
doevents

this might cause the screen to update and solve the problem.

--
Regards,
Tom Ogilvy


"TomThumb" wrote:

Thank you, Tom. I thought I needed to deselect to solve my problem, but I
still have my problem even after CutCopy=False.

My real problem is that I want to change the colors of two CommandButtons
immediately. One of my procedures (A), changes one button as desired. The
other(B), is delayed until some other procedures have finished. The main
difference in the two procedures is that the procedure causing the delayed
color change(B), uses an integer on the spreadsheet.

I believe I am using Application.ScreenUpdating properly.

The problem is that both procedures succeed on the second and subsequent
uses. Furthermore, if I follow a double-success with with a single click
anywhere on the spreadsheet, I get one success and the other (the same
procedure B) delayed. Any Ideas?
--
TomThumb


"Tom Ogilvy" wrote:

It is a valid selection. Millions use it successfully.

--
Regards,
Tom Ogilvy


"TomThumb" wrote:

I have read some suggestions to use:
"Application.CutCopyMode = False"
but am leery of using that because "False" is not a valid value for CutCopy,
only "XLCopy" and "XLCut" are.
--
TomThumb

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Excel 2007 VBA/Vista - How do I deselect a selection programmatica

Thanks for your help, Tom.
I tried DoEvents, but it transferred control to Vista and Vista did unknown
things before it came back to my procedures. Thanks, anyway. I don't wish
to spend any more time on this minor point. I will just christen the delay
as a "program feature" and forget about it.
--
TomThumb


"TomThumb" wrote:

I have read some suggestions to use:
"Application.CutCopyMode = False"
but am leery of using that because "False" is not a valid value for CutCopy,
only "XLCopy" and "XLCut" are.
--
TomThumb

Reply
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
Excel 2007 and Office 2007 stink (so does Vista) P. U. Excel Discussion (Misc queries) 1 March 25th 09 05:21 PM
deselect row/column from multiple selection Alan C Excel Discussion (Misc queries) 2 March 5th 09 05:53 PM
Re-set autofilter selection after adding a new row - programmatica Sarah Excel Programming 6 March 15th 07 06:45 PM
Deselect cells with formulas in selection Thorsten Gleumes Excel Programming 2 March 2nd 06 03:00 PM
programmatically deselect a selection? Rich Excel Programming 4 February 24th 06 11:31 PM


All times are GMT +1. The time now is 05:27 PM.

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

About Us

"It's about Microsoft Excel"