Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |