I was here once before and I'm back; Here's my quandary:

What I want to do is build a filename (and save it of course) using what the user puts into a txtbox. In that filename I have the user select one of three option buttons and a number of checkboxes. In other words this filenname is built from 3 variables; one string; one conditional (the result of the option button) and the result(s) of the check boxes.

Any help? Thank you.

(i'd upload a pic of the form in *.bmp format but cannot

Recommended Answers

All 3 Replies

Add a string value to each and just add them all together -

''In the top of your code window just after Option Explicit, the following...

Dim strOne As String, strOption As String, strResult As String, strAll As String

In each controls events (checkbox_click, Option_click etc events)

strOne = TheStringSet

''Option...
If Option1.Value = True Then
strOption = TheOptionSelectedHere
ElseIf Option2.Value = True Then
....
End If

I'm sure you get the idea.

''Before you do the file name, add the all together...
strAll = strOne & "/" & strOption & "/" & strResult

''If it was a file path you were putting together for instance, you will have something like - FilePath = strAll

thank you will try and see if that works

You might want to use a backslash instead of a forward slash as a separator.

commented: As always the reverend is here to catch my mistakes, thanx. :) +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.