Protect file name

T

Tempy

Good day all, i need to send a file retrieved from SAP and send it to a
supplier with the following format: 720_1234567_091005_I.xls

720 = the buyer number (Variable)
1234567 = Vendor number (Variable)
091005 = Date (Variable)
I = Input (Static)

The numbers and date are variable per download from SAP.

I need to keep the file name exactly as it is, could somebody please
help in advising if it is possible to do with code and how to do it.


thanks in advance.

regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
 
V

Vacation's Over

looks like you just need to construct a string, then save as (unless teh data
and input are real time adjustments?

dim myName as string
myname = ""
myname = Cstr(buyernumber) & "_" & Cstr(Vendornumber) & "_" &
cstr(date) & "_" & cstr(input) &".xls"

' add path info as needed
'myname = "PAthinformation" & myname

myfile.saveas Filename:=myname
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top