Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default file conversion

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

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
File Conversion tjorgens Excel Discussion (Misc queries) 1 September 29th 09 05:27 PM
File conversion Dasco New Users to Excel 1 July 12th 08 09:10 AM
AppleWorks file conversion to Excel file Don merkel Excel Discussion (Misc queries) 0 February 1st 08 07:27 AM
old xls file conversion Denise1 Setting up and Configuration of Excel 3 January 31st 06 03:02 AM
.csv file conversion Amber_D_Laws[_34_] Excel Programming 9 January 26th 06 02:29 PM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"