Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Macro using a cell reference

I have an aplication called DPlot that can take commands from inside excel
using macros.

I managed to interact already with it using the following: -

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

I created a button for each macro and that works fine. But the problem is
that to acheive the disired result I have to click a lot of times on each
button. I know that I can replace the 1 and -1 with higher numbers but then
that will be too course.

I was wondering if and how I could replace the 1 and -1 numbers with cell
contents, which cells contents are controlled via a scroll bar inside excel.

I know how to use the scroll bars, but I cannot find the correct way to
declare the cells inside the macro and subsequently how to use them/their
value.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default Macro using a cell reference

Can you do something like:

DDEExecute Channel, "[ContourViewChange(," & Range("A2").Value & ")]"

--
Best Regards,

Luke M
"Jason Falzon" wrote in message
...
I have an aplication called DPlot that can take commands from inside excel
using macros.

I managed to interact already with it using the following: -

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

I created a button for each macro and that works fine. But the problem is
that to acheive the disired result I have to click a lot of times on each
button. I know that I can replace the 1 and -1 with higher numbers but
then
that will be too course.

I was wondering if and how I could replace the 1 and -1 numbers with cell
contents, which cells contents are controlled via a scroll bar inside
excel.

I know how to use the scroll bars, but I cannot find the correct way to
declare the cells inside the macro and subsequently how to use them/their
value.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Macro using a cell reference

Yes this works as it takes the value of my cell, but the problem is that I'd
like the macro to continuasly refresh so as it takes the new value
immediately, as the application calls for the cell value to change frequently
through a scroll bar.

"Luke M" wrote:

Can you do something like:

DDEExecute Channel, "[ContourViewChange(," & Range("A2").Value & ")]"

--
Best Regards,

Luke M
"Jason Falzon" wrote in message
...
I have an aplication called DPlot that can take commands from inside excel
using macros.

I managed to interact already with it using the following: -

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

I created a button for each macro and that works fine. But the problem is
that to acheive the disired result I have to click a lot of times on each
button. I know that I can replace the 1 and -1 with higher numbers but
then
that will be too course.

I was wondering if and how I could replace the 1 and -1 numbers with cell
contents, which cells contents are controlled via a scroll bar inside
excel.

I know how to use the scroll bars, but I cannot find the correct way to
declare the cells inside the macro and subsequently how to use them/their
value.



.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Reg Reg is offline
external usenet poster
 
Posts: 48
Default Macro using a cell reference

Wrap this around it and put it in ThisWorkbook

Private Sub Workbook_SheetChange()

End Sub

"Jason Falzon" wrote:

Yes this works as it takes the value of my cell, but the problem is that I'd
like the macro to continuasly refresh so as it takes the new value
immediately, as the application calls for the cell value to change frequently
through a scroll bar.

"Luke M" wrote:

Can you do something like:

DDEExecute Channel, "[ContourViewChange(," & Range("A2").Value & ")]"

--
Best Regards,

Luke M
"Jason Falzon" wrote in message
...
I have an aplication called DPlot that can take commands from inside excel
using macros.

I managed to interact already with it using the following: -

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

I created a button for each macro and that works fine. But the problem is
that to acheive the disired result I have to click a lot of times on each
button. I know that I can replace the 1 and -1 with higher numbers but
then
that will be too course.

I was wondering if and how I could replace the 1 and -1 numbers with cell
contents, which cells contents are controlled via a scroll bar inside
excel.

I know how to use the scroll bars, but I cannot find the correct way to
declare the cells inside the macro and subsequently how to use them/their
value.



.

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
Using cell as worksheet reference (macro) Edwin Excel Discussion (Misc queries) 2 January 26th 10 08:42 PM
absolute cell reference macro rk0909 Excel Discussion (Misc queries) 4 November 7th 09 12:37 AM
Cell Reference Macro Scott Excel Discussion (Misc queries) 3 June 16th 09 04:13 PM
cell reference in macro AJB Excel Discussion (Misc queries) 2 August 7th 07 04:22 PM
variable cell reference in a macro [email protected] Excel Discussion (Misc queries) 6 January 25th 07 12:34 AM


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