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

I would like to build a form in Excel and code VB to write
the data to an output file. (which I feel confident that
I can do), but I would like to tie the output file name to
the computer name. By computer name I am referring to the
network computer ID, not the USER name from the office
application.

Is it possible to pull a computer's network name into VB?

This might be possible with HTML forms using CGI scripts,
but I don't know who to code CGI-BIN scripts.

TIA,
Collings
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Form output naming

Collings,

You can get the computer name with the GetComputerName API
function. E.g.,


Declare Function GetComputerName Lib "kernel32" _
Alias "GetComputerNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long

Function ComputerName() As String
Dim CN As String
Dim L As Long: L = 255
Dim Res As Long
CN = String$(L, " ")
Res = GetComputerName(CN, L)
ComputerName = Left(CN, L)
End Function


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Collings" wrote in message
...
I would like to build a form in Excel and code VB to write
the data to an output file. (which I feel confident that
I can do), but I would like to tie the output file name to
the computer name. By computer name I am referring to the
network computer ID, not the USER name from the office
application.

Is it possible to pull a computer's network name into VB?

This might be possible with HTML forms using CGI scripts,
but I don't know who to code CGI-BIN scripts.

TIA,
Collings



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
excel form. Need data extracted to spreadsheet each time a form co MikeR-Oz Excel Discussion (Misc queries) 4 April 5th 09 05:18 AM
Using a template form, advance a form number everytime you open ShoDan Excel Discussion (Misc queries) 1 January 31st 08 01:34 PM
Can a form made in Excel 2002 be converted into a fillable form? Paraclete Excel Discussion (Misc queries) 1 February 20th 07 09:20 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM
format cell from data input to output form Brad Stevenson Excel Worksheet Functions 2 May 19th 05 06:04 PM


All times are GMT +1. The time now is 08:03 PM.

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"