Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default How to use VBA to open the Condtional Format dialog box for the user

I'm writing a macro that allows the user to change the colors of the
Conditional formattting. I can't figure out how to open the Conditional
Formtting dialog box and then end the macro. My intent is to use an event
to run another macro after they've set the colors. Ideally, the event would
be the close of the Conditional Formatting dialog box, but I'm not sure
that is an XL event. If not, I'll just have the user selecting a cell as
the event.

1. Can anyone tell me how to open the Conditional Formatting dialog box
from VBA and leave it open for the user to edit?

2. Is the closing of the Conditional Formatting dialog box an event? If so,
what is it called?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default How to use VBA to open the Condtional Format dialog box for the us

Opening the dialog should be as easy as:

Application.Dialogs(xlDialogConditionalFormatting) .Show

I could not figure out how to trap its events, however. Good luck with that
part!

HTH,

Eric

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default How to use VBA to open the Condtional Format dialog box for the us

You might try this also:

myvar = Application.Dialogs(xlDialogConditionalFormatting) .Show

It will return True/False depending on whether the user pressed Okay or
Cancel. It should also make your VBA subroutine pause until the user is done.

Eric

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default How to use VBA to open the Condtional Format dialog box for the user

On Wed, 21 Jan 2009 14:23:09 -0700, salgud wrote:

I'm writing a macro that allows the user to change the colors of the
Conditional formattting. I can't figure out how to open the Conditional
Formtting dialog box and then end the macro. My intent is to use an event
to run another macro after they've set the colors. Ideally, the event would
be the close of the Conditional Formatting dialog box, but I'm not sure
that is an XL event. If not, I'll just have the user selecting a cell as
the event.

1. Can anyone tell me how to open the Conditional Formatting dialog box
from VBA and leave it open for the user to edit?

2. Is the closing of the Conditional Formatting dialog box an event? If so,
what is it called?

Thanks in advance.


I'm gathering from the lack of replies, this (opening the Conditional
Formatting dialog box and stopping the macro) is not doable. Can someone
confirm so I can go ahead and finish this project?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default How to use VBA to open the Condtional Format dialog box for th

To be a little more specific:

Option Explicit
Option Base 1

Sub Do_Conditional_Formatting()
Dim User_Finished As Boolean
'
' Put up the conditional formatting dialog box.
'
User_Finished = Application.Dialogs(xlDialogConditionalFormatting) .Show
'
' The dialog box halts the VBA code until the user presses Okay
' or Cancel. When that happens, control is returned to this
' routine. Then you can call whatever other routine you want.
'
If (User_Finished) Then Call My_Other_Subroutine ' Won't run if user
pressed Cancel
'
End Sub
'
Sub My_Other_Subroutine()
MsgBox "This won't happen until the user closes the conditional" & _
"formatting dialog box!"
'
' Do other stuff...
'
End Sub

Is this not what you are looking for? Your macro that puts up the
conditional formatting box will halt until the box is closed. When the user
is done, control is returned to the macro that was running. Then you can run
whatever other code you want.


I'm gathering from the lack of replies, this (opening the Conditional
Formatting dialog box and stopping the macro) is not doable. Can someone
confirm so I can go ahead and finish this project?



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
Cell format dialog box will not open ms.giz Excel Discussion (Misc queries) 1 May 21st 08 05:34 PM
Condtional Format Dave Excel Discussion (Misc queries) 3 July 18th 07 02:05 AM
Condtional Format Question Jon Dow[_2_] Excel Worksheet Functions 2 April 15th 07 04:08 AM
condtional format to Todd Excel Worksheet Functions 0 June 16th 06 05:52 PM
Condtional Format Problem ! Michael168[_35_] Excel Programming 5 October 12th 03 07:18 PM


All times are GMT +1. The time now is 07:35 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"