Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
| Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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
  #1 (permalink)  
Old August 16th, 2007, 09:26 AM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default I dont know what the topic is?!

However,
You know you have %systemroot% or something like that to determine the users system folder so you dont have to specify names because not every user has the same folder named the same!
I was wondering what it would be (the entire path) if you wanted to get to the users My Music folder?

im sure it would look something like
C:\Documents And Settings\%Currentuser%\My Documents\My Music
But i don't know what the %currentuser% bit would be?!

Cheers

------------------------------------------------
Apocolypse2005
Always ready and waiting to be helped!
__________________
Apocolypse2005, I'm a programmer - of sorts.
  #2 (permalink)  
Old August 16th, 2007, 02:07 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You can get the Current User out of the environment variables (USERNAME).
  #3 (permalink)  
Old August 18th, 2007, 01:47 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

How would you do it?!
  #4 (permalink)  
Old August 20th, 2007, 12:44 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Code:
    Dim s As String
        s = Environ$("USERNAME")


Similar Threads
Thread Thread Starter Forum Replies Last Post
TabControls dont want my buttons iceman90289 C# 2005 4 April 5th, 2008 05:48 AM
Dont buy this book gmorris59 BOOK: Professional C# 2005 with .NET 3.0 ISBN: 978-0-470-12472-7 0 October 5th, 2007 03:35 PM
database dont exist zachatcoza All Other Wrox Books 2 July 31st, 2007 02:44 PM
Sessions dont work melkin ASP.NET 1.0 and 1.1 Professional 6 April 12th, 2007 01:17 PM
Is this topic a professional topic?? mega ASP.NET 1.0 and 1.1 Professional 0 December 3rd, 2004 09:37 PM





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