Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default help with code

Hmm... that's no good eh?

I think that I said that you could use Environ("username") to get the
Windows User Name of the person who's currently logged in to the PC and
then go from there.

Cheers,
Jason Lepack

timmulla wrote:
I didn't see any comments in your post.
--
Regards,

timmulla


"timmulla" wrote:

I have a spreadsheet with the following inputs.

Cell B1 = names (Adam, Tim , Jerry , Joe, John, Bill, Jen)

Cell B2 = Day of the week (Monday, Tuesday, Wednesday, Thursday, Friday,
Saturday, Sunday)

The selections in cell B1 and B2 are automatically generating the
appropriate data in cell B3 and range B5:B10. I then have the following the
code to write range B5:B10 to a text file:

Sub Macro5()
Dim FName As String
Dim FNum As Integer
Dim Rng As Range
FName = "C:\Documents and Settings\tmullady\Desktop\Test.txt"
FNum = FreeFile
Open FName For Output Access Write As #FNum
Print #FNum, Range("B3").Text
For Each Rng In Range("B5:B10")
Print #FNum, Rng.Text
Next Rng
Close #FNum
End Sub

I created a form that enables a user to select the day of the week, which
will populate cell B2. I need help writing code that will automatically
change the contents in cell B1 for each of the people (Adam, Tim , Jerry ,
Joe, John, Bill, Jen) and then write the contents range B5:B10 to a text
file. Basically, I want a user to select a day in the week which will
automatically generate 7 different text files. The text files need to be
named based on the text in cell B3.

Any help would be appreciated.


--
Regards,

timmulla


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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
Excel code convert to Access code - Concat & eliminate duplicates italia Excel Programming 1 September 12th 06 12:14 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM


All times are GMT +1. The time now is 04:14 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"