Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing Variables through Custom Dialog Boxes


I have a Custom form Options Popup appear whenever an "Options" Comman
button is pressed on my main page. Now within this Popup there ar
several options that the user will be able to manipulate. Although
can't get the values to pass back from the popup.

On the main page there is a "Calculate" button that does all th
calculations, that leads to a Private Sub that does all the work. S
basically Im asking can I get a custom form options to work with m
spreadsheet

here is some code, I hope it helps

Private Sub cmdOpts_Click()
Load SSheduleOpt 'Load the Form into memory
SSheduleOpt.Show 'Show the form on screen
End Sub

This is where the popup appears although it does appear but it does no
affect my spreadsheet yet.

Private Sub cmdCalcWD_Click()
Dim SSheet As New SSched

' create an instance of your class object
'Set SSheet = New SSched

'Functions to actually work the Spreadsheet
cmdClear_Click 'Clears the workspace
SetDays SSheet 'Sends SShet Variable to the SetDays Su
Routine
End Sub
This one is the Calculate button, don't mind the custom class, but
just want to know how to tie my options menu into "SetDays" Sub. M
brain is kinda scattered (Long Day of coding) so if it doesn't mak
sense let me know I'll Edit it.

Thanks in advance

--
Xiaze
-----------------------------------------------------------------------
Xiazer's Profile: http://www.excelforum.com/member.php...fo&userid=3158
View this thread: http://www.excelforum.com/showthread.php?threadid=54217

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Passing Variables through Custom Dialog Boxes

Embed your databoxes on the form then address them through form.property
setups like
Range.("A1").Value = Form1.Textbox1.text
or constructs in that vein -- ;-)


--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


"Xiazer" wrote in
message ...

I have a Custom form Options Popup appear whenever an "Options" Command
button is pressed on my main page. Now within this Popup there are
several options that the user will be able to manipulate. Although I
can't get the values to pass back from the popup.

On the main page there is a "Calculate" button that does all the
calculations, that leads to a Private Sub that does all the work. So
basically Im asking can I get a custom form options to work with my
spreadsheet

here is some code, I hope it helps

Private Sub cmdOpts_Click()
Load SSheduleOpt 'Load the Form into memory
SSheduleOpt.Show 'Show the form on screen
End Sub

This is where the popup appears although it does appear but it does not
affect my spreadsheet yet.

Private Sub cmdCalcWD_Click()
Dim SSheet As New SSched

' create an instance of your class object
'Set SSheet = New SSched

'Functions to actually work the Spreadsheet
cmdClear_Click 'Clears the workspace
SetDays SSheet 'Sends SShet Variable to the SetDays Sub
Routine
End Sub
This one is the Calculate button, don't mind the custom class, but i
just want to know how to tie my options menu into "SetDays" Sub. My
brain is kinda scattered (Long Day of coding) so if it doesn't make
sense let me know I'll Edit it.

Thanks in advance.


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile:
http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Passing Variables through Custom Dialog Boxes

you can add to them before you Show the dialogue and read them back before
you release the memory

--
Wendell A. Clark, BS



-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


"Xiazer" wrote in
message ...

I have a Custom form Options Popup appear whenever an "Options" Command
button is pressed on my main page. Now within this Popup there are
several options that the user will be able to manipulate. Although I
can't get the values to pass back from the popup.

On the main page there is a "Calculate" button that does all the
calculations, that leads to a Private Sub that does all the work. So
basically Im asking can I get a custom form options to work with my
spreadsheet

here is some code, I hope it helps

Private Sub cmdOpts_Click()
Load SSheduleOpt 'Load the Form into memory
SSheduleOpt.Show 'Show the form on screen
End Sub

This is where the popup appears although it does appear but it does not
affect my spreadsheet yet.

Private Sub cmdCalcWD_Click()
Dim SSheet As New SSched

' create an instance of your class object
'Set SSheet = New SSched

'Functions to actually work the Spreadsheet
cmdClear_Click 'Clears the workspace
SetDays SSheet 'Sends SShet Variable to the SetDays Sub
Routine
End Sub
This one is the Calculate button, don't mind the custom class, but i
just want to know how to tie my options menu into "SetDays" Sub. My
brain is kinda scattered (Long Day of coding) so if it doesn't make
sense let me know I'll Edit it.

Thanks in advance.


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile:
http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing Variables through Custom Dialog Boxes


If I write my code so that it doesn't unload the form could that kee
the options that the users set? I really wanted to avoid storin
information on the spreadsheet, i really want to keep it all in VBA. i
it possible to do that

--
Xiaze
-----------------------------------------------------------------------
Xiazer's Profile: http://www.excelforum.com/member.php...fo&userid=3158
View this thread: http://www.excelforum.com/showthread.php?threadid=54217

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing Variables through Custom Dialog Boxes


I'm hoping that I can find an easier way to do this but best I am doing
is having On Change update the Spreadsheet


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile: http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Passing Variables through Custom Dialog Boxes

Xiazer,

When you load the form

you can manipulate its data (text/cobo/lists-boxes)

then you display it to the user and they can see the data that you allowed.

when they click [ok] the form -- You can cause the form to be 'hidden' so
that the data remains in the background.

then If you want to use the data elsewhere as well you can :
1. build a small class with protected properties (keeping -- your data
unalterable except by you -- or your code)
- or -
1. you can set a global-variable that is visible to all code-segments
(yours or others)

when you unload the form the class instantiation or the global-variable
(dependent upon where you initialized it) will remain in memory (although
usually inaccessible)

setting the form to nothing actually releases all references to the
memory -- any further attempt to use it will either error-out or cause a
rebuild of the form


--
Wendell A. Clark, BS

-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


"Xiazer" wrote in
message ...

If I write my code so that it doesn't unload the form could that keep
the options that the users set? I really wanted to avoid storing
information on the spreadsheet, i really want to keep it all in VBA. is
it possible to do that?


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile:
http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing Variables through Custom Dialog Boxes


So Do I want to Load and Unload only once

--
Xiaze
-----------------------------------------------------------------------
Xiazer's Profile: http://www.excelforum.com/member.php...fo&userid=3158
View this thread: http://www.excelforum.com/showthread.php?threadid=54217

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Passing Variables through Custom Dialog Boxes

You will want to load when you open the sheet ,

hide in the middle once you've set your variables
and unload when you close ;-)
--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


"Xiazer" wrote in
message ...

So Do I want to Load and Unload only once?


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile:
http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174



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
Custom Dialog Boxes iambalrog[_3_] Excel Programming 1 December 16th 05 10:04 AM
editing custom dialog boxes Shadowrift Excel Worksheet Functions 5 August 19th 05 07:48 PM
Passing variables from one sub to another Yasha Avshalumov Excel Programming 4 August 19th 05 04:52 PM
Passing Variables Paula[_3_] Excel Programming 1 August 23rd 04 06:55 PM
Passing Variables Tom Ogilvy Excel Programming 0 July 23rd 04 04:19 PM


All times are GMT +1. The time now is 09:45 PM.

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

About Us

"It's about Microsoft Excel"