ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   InputBox Query (https://www.excelbanter.com/excel-programming/362969-inputbox-query.html)

Noemi

InputBox Query
 
Hi
I have an inputbox which stores the message in stMessage.

stMessage has bee put as a public sub so we can use the stMessage in other
sub's.

I have a cmd button which checks that all details are entered prior to
emailing the spreadsheet and if something is missing a msgbox appears
advising the user to enter information.

When this happens, the stMessage is wiped clean and we lose the message.

Is there a way to make sure that the stMessage doesn't change unless advised
to do so.

Thanks
Noemi

Jeff Standen[_2_]

InputBox Query
 
Sounds like you are using stMessage to store the answer from the second
message box you talk about, as well as the original inputbox. Just use
another variable for that message box.

Jeff

"Noemi" wrote in message
...
Hi
I have an inputbox which stores the message in stMessage.

stMessage has bee put as a public sub so we can use the stMessage in other
sub's.

I have a cmd button which checks that all details are entered prior to
emailing the spreadsheet and if something is missing a msgbox appears
advising the user to enter information.

When this happens, the stMessage is wiped clean and we lose the message.

Is there a way to make sure that the stMessage doesn't change unless
advised
to do so.

Thanks
Noemi




Noemi

InputBox Query
 
Hi Jeff
I tried it but the stMessage stl goes to nothing once the program ends due
to missing data needs to be entered.

Is there a way to store the information in the stMessage so even if the
program ends (due to having to enter additional information) we dont lose the
comments entered previously.

Thanks
Noemi

"Jeff Standen" wrote:

Sounds like you are using stMessage to store the answer from the second
message box you talk about, as well as the original inputbox. Just use
another variable for that message box.

Jeff

"Noemi" wrote in message
...
Hi
I have an inputbox which stores the message in stMessage.

stMessage has bee put as a public sub so we can use the stMessage in other
sub's.

I have a cmd button which checks that all details are entered prior to
emailing the spreadsheet and if something is missing a msgbox appears
advising the user to enter information.

When this happens, the stMessage is wiped clean and we lose the message.

Is there a way to make sure that the stMessage doesn't change unless
advised
to do so.

Thanks
Noemi





Jeff Standen[_2_]

InputBox Query
 
Ah, sorry, misunderstood your question. Variables disappear from memory when
the program finishes, so you need to store the information somewhere. I
would use a hidden Name, since that is kept even when the workbook is
closed. You can then fetch it from there when you need to.

Jeff


"Noemi" wrote in message
...
Hi Jeff
I tried it but the stMessage stl goes to nothing once the program ends due
to missing data needs to be entered.

Is there a way to store the information in the stMessage so even if the
program ends (due to having to enter additional information) we dont lose
the
comments entered previously.

Thanks
Noemi

"Jeff Standen" wrote:

Sounds like you are using stMessage to store the answer from the second
message box you talk about, as well as the original inputbox. Just use
another variable for that message box.

Jeff

"Noemi" wrote in message
...
Hi
I have an inputbox which stores the message in stMessage.

stMessage has bee put as a public sub so we can use the stMessage in
other
sub's.

I have a cmd button which checks that all details are entered prior to
emailing the spreadsheet and if something is missing a msgbox appears
advising the user to enter information.

When this happens, the stMessage is wiped clean and we lose the
message.

Is there a way to make sure that the stMessage doesn't change unless
advised
to do so.

Thanks
Noemi







Noemi

InputBox Query
 
Hi Jeff
I dont understand what you mean by hidden Name.
Can you please clarify for me.
Thanks
Noemi

"Jeff Standen" wrote:

Ah, sorry, misunderstood your question. Variables disappear from memory when
the program finishes, so you need to store the information somewhere. I
would use a hidden Name, since that is kept even when the workbook is
closed. You can then fetch it from there when you need to.

Jeff


"Noemi" wrote in message
...
Hi Jeff
I tried it but the stMessage stl goes to nothing once the program ends due
to missing data needs to be entered.

Is there a way to store the information in the stMessage so even if the
program ends (due to having to enter additional information) we dont lose
the
comments entered previously.

Thanks
Noemi

"Jeff Standen" wrote:

Sounds like you are using stMessage to store the answer from the second
message box you talk about, as well as the original inputbox. Just use
another variable for that message box.

Jeff

"Noemi" wrote in message
...
Hi
I have an inputbox which stores the message in stMessage.

stMessage has bee put as a public sub so we can use the stMessage in
other
sub's.

I have a cmd button which checks that all details are entered prior to
emailing the spreadsheet and if something is missing a msgbox appears
advising the user to enter information.

When this happens, the stMessage is wiped clean and we lose the
message.

Is there a way to make sure that the stMessage doesn't change unless
advised
to do so.

Thanks
Noemi








All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com