Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In this example, I am using the variable s4 to hold the _34 as I don't know
how to generate it automatically. The rest of the code shows how to build a string in the correct format from today's date: Sub pettis() Dim s1 As String Dim s2 As String Dim s3 As String Dim s4 As String s4 = "_34" s1 = "GEN_UNIEK_CNTRMAN_2008" mnth = Month(Now) If mnth 10 Then s2 = "_" & mnth Else s2 = "_" & "0" & mnth End If dy = Day(Now) If dy 10 Then s3 = "_" & dy Else s3 = "_" & "0" & dy End If MsgBox (s1 & s3 & s2 & s4) End Sub -- Gary''s Student - gsnu200773 "Rpettis31" wrote: I receive files 2x daily with tracking information that is in a txt format. The files come in the name format example GEN_UNIEK_CNTRMAN_2008_15_03_34. I would like to know how to get the time date stamp to access these files by using the GEN_UNIEK_CNTRMAN_2008-* and the date to open these files. I have code that works to convert the file and save it as an xls. So I just need to know how to pull these other files that have been stored for the past year. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File Conversion | Excel Discussion (Misc queries) | |||
File conversion | New Users to Excel | |||
AppleWorks file conversion to Excel file | Excel Discussion (Misc queries) | |||
old xls file conversion | Setting up and Configuration of Excel | |||
.csv file conversion | Excel Programming |