Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Append code to a xlDialog

Hello - I'm trying to find a way to run a procedure in conjunction with a
specific common dialog routine. Specifically I want to run some code
immediately after the format axis / scale dialog. I guess I want something
like a dialog event procedure. Is it possible?
Thanks in advance...
-Kent


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Append code to a xlDialog

Hi Kent-
I assume you want to use the new "scale" data from the dialog in your
procedure. I think the Chart_Before_Double_Click with do the job. The
catch is that you have to replace the default dialog box with a duplicate.
Then you can put your code after the inputs from the dialog box are
received. You will then need to do a "cancel" to avoid getting the default
box.
The following code will help explain. Put it behind the chart you are
working with. The msgbox shows the paramenter values that are passed for the
selected object. You will want to get rid of that after you enter your
special code.

Private Sub Chart_BeforeDoubleClick(ByVal ElementID As Long, ByVal Arg1 As
Long, ByVal Arg2 As Long, Cancel As Boolean)
Dim myChart As Chart
Dim strMessage As String
Dim dAXIS_MIN As Double
Dim dAXIS_MAX As Double
Set myChart = Chart4 'use immediate window ?activechart.codename to
get codename.
strMessage = "Element ID = " & ElementID & vbCrLf
strMessage = strMessage & "Arg1 = " & Arg1 & vbCrLf
strMessage = strMessage & "Arg2 = " & Arg2
MsgBox (strMessage)
If ElementID = 21 Then '21 Indicates a "y" axis is selected
Application.CommandBars(48).Controls(1).Execute 'runs the 'format axis'
comand
If Arg1 = 1 Then 'primary axis is selected
PUT YOUR CODE HERE
End If
Cancel = True 'Avoids running default command.
End If
End Sub

I hope this helps.
Susie
******************
"Kent Smith" wrote in message
...
Hello - I'm trying to find a way to run a procedure in conjunction with a
specific common dialog routine. Specifically I want to run some code
immediately after the format axis / scale dialog. I guess I want
something like a dialog event procedure. Is it possible?
Thanks in advance...
-Kent



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
How do you append one row to another? BobVanS Excel Worksheet Functions 3 August 30th 07 02:04 PM
how to know which row to append for the last row tango Excel Programming 2 October 16th 04 02:23 PM
XLDialog Printer Setup Ron Crapo Excel Programming 2 August 27th 04 05:40 PM
append row Joe Excel Programming 4 July 30th 04 04:47 PM
xldialog Philipp Oberleitner[_2_] Excel Programming 5 July 9th 04 06:39 PM


All times are GMT +1. The time now is 02:33 AM.

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"