Wrox Programmer Forums
|
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 May 16th, 2006, 03:13 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default user name in the code

hello,

In vba excel.
 is there any way that i could use the author name of the worksheet or the user name that login the computer (much better),in the vba code and put it in a cell i want.

thanks


 
Old May 16th, 2006, 03:22 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,


Sub InsertUserName()
'*** User name
Range("A1") = Environ("Username")
'*** Author name
Range("A2") = Application.UserName
End Sub



-vemaju





Similar Threads
Thread Thread Starter Forum Replies Last Post
user control code chroniclemaster1 ASP.NET 2.0 Professional 11 September 25th, 2008 03:53 PM
User.Identity.Name and accessing it from code CodeBugger C# 3 May 24th, 2006 04:41 PM
user control / code behind question whyulil General .NET 3 January 11th, 2005 11:17 AM
User Control / Code-behind ViagraFalls ASP.NET 1.0 and 1.1 Basics 3 November 1st, 2003 09:18 PM





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