Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I have a macro that receives a variable that is input by a user (&rsp1)
I want a MsgBox to display Do you want to print off the data for and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I'm not sure i ub=nderstand the second part of your question but try this for
the first bit. Sub givemesomeinput() rsp1 = InputBox("Respond please?", vbYesNo) msg = " Do you want to print off the data for " & rsp1 MsgBox (msg) End Sub "Pank" wrote: I have a macro that receives a variable that is input by a user (&rsp1) I want a MsgBox to display Do you want to print off the data for and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated. |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
MsgBox "Do you want to print off the data for " & rsp1 & "- 1?", _
vbYesNo, "Do you want to Print off" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pank" wrote in message ... I have a macro that receives a variable that is input by a user (&rsp1) I want a MsgBox to display "Do you want to print off the data for "and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off" Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated. |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
MsgBox("Do you want to print off the data for " &rsp1 - 1?), vbYesNo
If MsgBox = vbNo then 'Skip over the print command and go to next line of code. Workbooks.open("C:\MyDocuments\ExcelFiles\MyFilena me.xls") You will be prompted for Update Links?, ReadOnly? etc. You can ignore these unless you need the file to update links etc. -- Best wishes, Jim "Pank" wrote: I have a macro that receives a variable that is input by a user (&rsp1) I want a MsgBox to display Do you want to print off the data for and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated. |
#5
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thanks guys, just what the Doctor ordered.
"Bob Phillips" wrote: MsgBox "Do you want to print off the data for " & rsp1 & "- 1?", _ vbYesNo, "Do you want to Print off" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pank" wrote in message ... I have a macro that receives a variable that is input by a user (&rsp1) I want a MsgBox to display "Do you want to print off the data for "and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off" Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - MsgBox | Excel Worksheet Functions | |||
Macro - msgbox | Excel Worksheet Functions | |||
How to Bold text in MsgBox? | Excel Discussion (Misc queries) | |||
Why does formula show rather than results (not in text format) | Excel Worksheet Functions | |||
How to center text in a msgbox | Excel Discussion (Misc queries) |