text box input data concatenate to file name

G

Guest

Is there any suggestions on how to use text boxes to concatenate a file name?
If I have 3 text boxes I want to have the user select or input information
and then concatenate this with the date time (hr-sec) to create a unique name
that will save the this name as the workbook name in the same location
 
G

Guest

The following is an example of the type of code required:-

Dim strNowTime As String
Dim strTextBox As String
Dim strFileName As String

strTextBox = ActiveSheet.TextBox1.Value

strNowTime = Format(Now, "dd mmm yyyy hh-mm-ss")

'Concatenate TextBox value, space, time, file extension
strFileName = strTextBox & " " & strNowTime & ".xls"


Regards,

OssieMac
 

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

Top