Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default DDE Links...

I've got a spreadsheet that uses a DDE link to get 2 fields for an automatic
report. The DDE link is with a HMI/Scada package called CiTect.

My problem isn't the DDE link itself - that seems to be working perfectly.
My problem is when I run the automatic report the values printed in those
fields are #N/A#. The same value for both fields. When I view the report
that's printed the correct information is displayed.

To further complicate matters...if I'm viewing the report manually, and
click the "Print" button from the standard toolbar, everything prints out
exactly as it's supposed to including the DDE linked information.

I've written the code 2 ways

1) Sheet("Printout").Printout Copies:=1, Collate:=True

and

2) Sheet("Printout").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Every time I try to run the automatic routine, both DDE linked cells are
printed as '#N/A#'

What am I doing wrong?

Thanks

Jeff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DDE Links...

We have this problem at work sometimes with certain DDE's our quick an
dirty fix was do a copy paste special (with only values) into anothe
sheet then do the report from that sheet.

Keith
www.kjtfs.co

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default DDE Links...

Thanks. I'll try that tomorrow.

Jeff


"KJTFS " wrote in message
...
We have this problem at work sometimes with certain DDE's our quick and
dirty fix was do a copy paste special (with only values) into another
sheet then do the report from that sheet.

Keith
www.kjtfs.com


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default DDE Links...

I got around the problem. I'm posting this to help others who might make
the same mistake I did. The entire code was written in an Auto_Open()
macro. Everything - including the print routine and the closing routine -
was run in the Auto_Open macro. What I realized is that the spreadsheet
wasn't evaluating the DDE links until after the macro had concluded. By
that time I'd already printed out the report that was supposed to contain
the DDE information.

I got around this by using the Application.DDEInitiate, DDERequest, and
DDETerminate commands directly in the code and then programmically populated
the appropriate fields with the appropriate info.

Thanks.



"Jeff Harbin" wrote in message
ink.net...
I've got a spreadsheet that uses a DDE link to get 2 fields for an

automatic
report. The DDE link is with a HMI/Scada package called CiTect.

My problem isn't the DDE link itself - that seems to be working perfectly.
My problem is when I run the automatic report the values printed in those
fields are #N/A#. The same value for both fields. When I view the report
that's printed the correct information is displayed.

To further complicate matters...if I'm viewing the report manually, and
click the "Print" button from the standard toolbar, everything prints out
exactly as it's supposed to including the DDE linked information.

I've written the code 2 ways

1) Sheet("Printout").Printout Copies:=1, Collate:=True

and

2) Sheet("Printout").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Every time I try to run the automatic routine, both DDE linked cells are
printed as '#N/A#'

What am I doing wrong?

Thanks

Jeff




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
Slow opening links between workbooks with links created in 2003 Russell Excel Discussion (Misc queries) 0 December 14th 09 02:59 PM
Update links box gives Continue or Edit Links dialog KarenF Excel Discussion (Misc queries) 0 May 18th 07 01:17 PM
Edit Links: Changing links on a protected worksheet Halibut68 Excel Discussion (Misc queries) 0 April 28th 06 11:03 AM
EXCEL - LINKS cannot easily get list of all links & names in book Tuba Joe Excel Worksheet Functions 1 September 29th 05 10:33 PM
can't update links...can't find links GJR3599 Excel Discussion (Misc queries) 1 April 4th 05 04:56 PM


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