General discussion

Locked

Use string as part of filename in Excel XP VBA

By cozy ·
How do you take a string value and insert it into an excel vba saveas/savecopyas code line. The string value is 2 digits from an input box.
e.g activeworkbook.savecopyas( "\\directory\default filename text & [string from input box] & more default filename text.xls)

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by DKlippert In reply to Use string as part of fil ...

MyValue = InputBox("Enter 2 digits","A Input Box")


activeworkbook.savecopyas( "\\directory\default filename text" & MyValue & "more default filename text.xls")

Collapse -

by cozy In reply to

Poster rated this answer.
Thanks Problem solved

Collapse -

by cozy In reply to Use string as part of fil ...

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums