PC Review


Reply
Thread Tools Rate Thread

Can I blanket update all controls inside a frame?

 
 
Sam Kuo
Guest
Posts: n/a
 
      20th Apr 2008
I have several controls (i.e. textbox, combobox and checkbox) inside a frame
in a form and need ALL their values to update to their corresponding cells in
a worksheet when click a command button.

Is there a quicker way to do so rather than writing a line for each control
to force the blanket update?

Thanks in advance :-)

Sam
 
Reply With Quote
 
 
 
 
Héctor Miguel
Guest
Posts: n/a
 
      21st Apr 2008
hi, Sam !

> I have several controls (i.e. textbox, combobox and checkbox) inside a frame in a form
> and need ALL their values to update to their corresponding cells in a worksheet when click a command button.
> Is there a quicker way to do so rather than writing a line for each control to force the blanket update? ...


(assuming every control is "linked" to each cell)...
try "blanking" (in one step) "their corresponding cells" -?-

if any doubts (or further information)... would you please comment ?
regards,
hector.


 
Reply With Quote
 
Sam Kuo
Guest
Posts: n/a
 
      21st Apr 2008
Hi Hector,

The controls are linked to cells (with their ControlSource set to the
cells). The problem I had was that when the worksheet updates, not all these
controls update to reflect the changed value.

So what I do now is to code each control's value to its corresponding cell
in the subroutine CommandButton_Click(). This ensures all controls always
show their linked cells value in real time when click the button, and it's
working fine.

I just wonder if there's an easier way to refresh multiple form controls
without referring to the worksheet in the code like I did (as the form
controls already have their ControlSource specified in property)?

Sam

"Héctor Miguel" wrote:

> hi, Sam !
>
> > I have several controls (i.e. textbox, combobox and checkbox) inside a frame in a form
> > and need ALL their values to update to their corresponding cells in a worksheet when click a command button.
> > Is there a quicker way to do so rather than writing a line for each control to force the blanket update? ...

>
> (assuming every control is "linked" to each cell)...
> try "blanking" (in one step) "their corresponding cells" -?-
>
> if any doubts (or further information)... would you please comment ?
> regards,
> hector.
>
>
>

 
Reply With Quote
 
Héctor Miguel
Guest
Posts: n/a
 
      22nd Apr 2008
hi, Sam !

> The controls are linked to cells (with their ControlSource set to the cells).
> The problem I had was that when the worksheet updates, not all these controls update to reflect the changed value.
> So what I do now is to code each control's value to its corresponding cell in the subroutine CommandButton_Click().
> This ensures all controls always show their linked cells value in real time when click the button, and it's working fine.
> I just wonder if there's an easier way to refresh multiple form controls without referring to the worksheet in the code like I did
> (as the form controls already have their ControlSource specified in property)?


I'm not so sure I'm following you quite accurately -?-

I used a form with one textbox, one combobox and one checkbox (one commandbutton for "other" purposes)
(controlsource are A1, B1 and C1 respectively)

when I use each control, it's cell (controlsource) updates accordingly
when I click the userform, code "blanks" the range (A1:C1] and controls refresh to show the (new) data in their cells
when I click on a commandbutton, code "puts" data in source cells (obviously, controls do reflect this changes)

here is what I used in userform code-module:

Private Sub CommandButton1_Click()
[a1:c1] = Array("Test text", "Name 03", False)
End Sub
Private Sub UserForm_Click()
[a1:c1].ClearContents
End Sub

hth,
hector.

__ previous posts __
>>> I have several controls (i.e. textbox, combobox and checkbox) inside a frame in a form
>>> and need ALL their values to update to their corresponding cells in a worksheet when click a command button.
>>> Is there a quicker way to do so rather than writing a line for each control to force the blanket update? ...

>>
>> (assuming every control is "linked" to each cell)...
>> try "blanking" (in one step) "their corresponding cells" -?-



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls in a frame within a frame are always invisible - What am I doing wrong NoSpam@aol.com Microsoft Excel Programming 1 24th May 2010 08:13 PM
Controls inside a Frame do not display in design order. Jim Luedke Microsoft Excel Programming 2 18th Sep 2009 03:01 AM
access controls inside formview inside loginview wikkiwikkiwaa Microsoft ASP .NET 2 9th Aug 2006 07:27 AM
How to have links outside an inline frame open a specific spot inside the inline frame....... WGS Microsoft Frontpage 1 20th Apr 2005 12:23 AM
Referencing Controls Inside a Frame Patrick Flower Microsoft Outlook Form Programming 1 10th Jul 2003 03:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 PM.