J
Jason Falzon
Hello,
I have an application called DPlot that can take commands from excel through
a macro.
I managed to pass information like so: -
Sub DownElevation()
'
' DownElevation Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(,-1)]"
DDETerminate Channel
End Sub
Sub UpElevation()
'
' UpElevation Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(,1)]"
DDETerminate Channel
End Sub
Sub LeftAzimuth()
'
' LeftAzimuth Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(-1,)]"
DDETerminate Channel
End Sub
Sub RightAzimuth()
'
' RightAzimuth Macro
' Macro recorded 24/03/2010
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(1,)]"
DDETerminate Channel
End Sub
At the moment I created 4 buttons, each of which have 1 of the above macros
assigned. This results in having to click repeatedly until I acheive the
disired result.
Now I'd like to make it moredynamic by substituiting the 1 and -1 values by
a cell value inside the same workbook but possibly different sheet. This cell
will be in turn controlled by a scroll bar inside excel that varies from -180
to 180.
My problem is that I cannot figure out the coding to refer to the cell and
how to use it inside each macro
I have an application called DPlot that can take commands from excel through
a macro.
I managed to pass information like so: -
Sub DownElevation()
'
' DownElevation Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(,-1)]"
DDETerminate Channel
End Sub
Sub UpElevation()
'
' UpElevation Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(,1)]"
DDETerminate Channel
End Sub
Sub LeftAzimuth()
'
' LeftAzimuth Macro
' Macro recorded 24/03/2010
'
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(-1,)]"
DDETerminate Channel
End Sub
Sub RightAzimuth()
'
' RightAzimuth Macro
' Macro recorded 24/03/2010
'
Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[ContourViewChange(1,)]"
DDETerminate Channel
End Sub
At the moment I created 4 buttons, each of which have 1 of the above macros
assigned. This results in having to click repeatedly until I acheive the
disired result.
Now I'd like to make it moredynamic by substituiting the 1 and -1 values by
a cell value inside the same workbook but possibly different sheet. This cell
will be in turn controlled by a scroll bar inside excel that varies from -180
to 180.
My problem is that I cannot figure out the coding to refer to the cell and
how to use it inside each macro