Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 1st, 2010, 04:35 PM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Post User Data to Website

I have built a large workbook with dozens of macros that is accessed and used by several users internationally.

I'm interested in getting some useage statistics for this 'program.' Just getting into more complex VBA code writing, I have the following code launched when the workbook is opened:

Dim computerName As String
Dim userName As String
computerName = Environ$("computername")
userName = Environ$("username")


Can anyone educate me on how I can take this information (computer name and user name) and FTP it to my web server with a date/time stamp so I can see who and how often these workbooks are opened?

Thanks in advance for any and all help!
 
Old January 4th, 2010, 09:18 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

It would be better to save this in a Temporary file and load it to FTP.

On the other hand you can open an Excel file in your webserver, update and close it.

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old January 5th, 2010, 11:20 AM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need to be able to process this information completely behind the scenes without any user involvement. The macros utilize another application's API and therefore cannot be ran directly from the web server.

Is it possible to post the vales of userName and computerName in a new file and have it upload via FTP without the user being prompted?

Thank you again for your help. I'm sure there is a way to do this, I'm just hoping someone here can help/show me. :)

-DM
 
Old January 20th, 2010, 11:59 AM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: I still can't seem to post variable results to my server

Bump

Does anyone know how to do this?
 
Old January 21st, 2010, 02:59 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

You can use Environ to get the USername and Computer name (http://vbadud.blogspot.com/2007/05/e...using-vba.html)

Please have a look at http://www.ozgrid.com/forum/showthread.php?t=47625 for FTP
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
New user registered by the Website Administrator tool jean-yves dauchy ASP.NET 2.0 Basics 1 September 5th, 2009 06:41 AM
Which storage engine for "Post for sell goods" website taev MySQL 2 May 8th, 2009 02:53 PM
Submission Website by User WHSCT ASP.NET 2.0 Basics 10 November 29th, 2007 01:17 PM
First Post! adding an icon to a custom user form Banquo_ws Excel VBA 2 March 6th, 2007 04:36 AM
How to post data to window opener wjenkins Javascript How-To 4 August 30th, 2003 03:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.