Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Passing values across network...


Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2006, 12:16 PM
BBauer42's Avatar
BBauer42 BBauer42 is offline
Contributor
 
Join Date: Dec 2005
Location: CT, USA
Posts: 448
Unhappy Passing values across network...


I'm using VBA and Excel. I have a progam that is constantly running in our lab downstairs. It monitors both temperature and humidity of an oven and some other variables.

Our ovens have been acting up lately and it would be awesome if I could see the updated temperature and humidity on my PC upstairs. Is there a way in VBA I could grab these values over the network by printing them to a .txt file in a shared folder or something, then have them populate a form or .txt file on my PC upstairs?

Any suggestions would be great. Thanks!!
__________________
www.sportsloon.com
Reply With Quote
  #2  
Old 02-28-2006, 01:11 PM
herilane's Avatar
herilane herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

Not knowing anything about the program in question, it is hard to say whether it is possible to interact with it through VBA. Can the program be configured to save its output in a text file? Or is it doing that already?
Reply With Quote
  #3  
Old 03-01-2006, 12:58 AM
mattcovell mattcovell is offline
Newcomer
 
Join Date: Feb 2006
Posts: 8
Default

what if you print screen the lab pc every minute or so and save it to a shared folder, im not sure how you would do this but i would be interested to see.
Reply With Quote
  #4  
Old 03-02-2006, 08:26 AM
BBauer42's Avatar
BBauer42 BBauer42 is offline
Contributor
 
Join Date: Dec 2005
Location: CT, USA
Posts: 448
Default Print screen, etc...

The program that is running downstairs could be appended so it writes the varialbes to a .txt file.

I would then write another program to run on my machine upstairs that would hopefully browse to a folder, open and display the text in the .txt file. This would happen every 10 minutes or so just so I could keep tabs on the temp/humidity of the oven. Problem is I'm not sure how to read a .txt file that is in a network folder.

I could do the printscreen and just save it to a folder and check that every so often. However, I am not sure how to use VBA to take a screenshot...

Any ideas????

__________________
www.sportsloon.com
Reply With Quote
  #5  
Old 03-02-2006, 02:24 PM
herilane's Avatar
herilane herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

Opening a file in a network folder is no different from opening a local file.
Code:
Dim wb As Workbook Set wb = Workbooks.Open("\\computername\foldername\filename.xls") wb.Close
or if you're opening the file as text,
Code:
Open "\\computername\foldername\filename.xls" For Input As #1

Last edited by herilane; 03-02-2006 at 02:32 PM.
Reply With Quote
  #6  
Old 03-02-2006, 03:03 PM
wbeard52 wbeard52 is offline
Contributor
 
Join Date: Jul 2005
Location: Arizona
Posts: 638
Default

The easiest way without any code is to use the remote desktop feature (XP Pro) to place the desktop onto your computer. Any other OS can use RealVNC to remotely monitor what you need.
Reply With Quote
  #7  
Old 03-03-2006, 08:39 AM
BBauer42's Avatar
BBauer42 BBauer42 is offline
Contributor
 
Join Date: Dec 2005
Location: CT, USA
Posts: 448
Default

Thanks guys..
__________________
www.sportsloon.com
Reply With Quote
  #8  
Old 03-10-2006, 05:31 PM
Freddy1990 Freddy1990 is offline
Freshman
 
Join Date: Sep 2005
Location: Belgium
Posts: 34
Default

Wouldn't it be a lot easier to just use a winsock control to tranfer the data?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->