Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Return values from UserForms

I open an input form when the sheet is opened.
How can I get a return value from a UserForm, so I can close the form and
cancel the action if the Cancel Button is pressed, and I return to the
spreadsheet, as opposed to accepting the input, printing it, saving it and
closing it if they press OK.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Return values from UserForms

You don't.

Put a public variable in the general module, and have the cancel button set
the value of that variable so you can check it in your code.

--
Regards,
Tom Ogilvy


"Graham Y" wrote in message
...
I open an input form when the sheet is opened.
How can I get a return value from a UserForm, so I can close the form and
cancel the action if the Cancel Button is pressed, and I return to the
spreadsheet, as opposed to accepting the input, printing it, saving it and
closing it if they press OK.

TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Return values from UserForms

Thanks Tom

"Tom Ogilvy" wrote:

You don't.

Put a public variable in the general module, and have the cancel button set
the value of that variable so you can check it in your code.

--
Regards,
Tom Ogilvy


"Graham Y" wrote in message
...
I open an input form when the sheet is opened.
How can I get a return value from a UserForm, so I can close the form and
cancel the action if the Cancel Button is pressed, and I return to the
spreadsheet, as opposed to accepting the input, printing it, saving it and
closing it if they press OK.

TIA




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
Search multiple values to return single values JANA Excel Worksheet Functions 8 October 27th 05 04:26 PM
Passing variable values from userforms Todd Huttenstine Excel Programming 1 November 2nd 04 02:43 PM
Moving cell values from sheet2 to sheet1 using UserForms and ListBox Stein Kristiansen Excel Programming 0 November 20th 03 07:13 AM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"