I'll give you some hints.
You can open a dialog box using the InputBox function.
There are some methods of the DoCmd object that allow you to output to a named format. The one that does spreadsheets has a name function that can be a constant or a variable - such as one you might have asked for in an input box.
This next is an assumption of your context, but there is a forms wizard option that allows you to make a command button that runs a subroutine or function. So if you had a ready-made subroutine or function just waiting to be activated, the button wizard in forms design could help you.