Programming and Application(编程与应用)


Content(目录)




Linux


MySQL
Office















 
PCNow 30-Day Free Trial, Remote PC Access
 
Logo_234x60

A Form used to Pick Up from a Worksheet


A Form used to Pick Up from a Worksheet

Zhanshan Dong

Excel provides a handy control called RedEdit. If you put a RefEdit control on a modal form, you can easily pick up a range of cells in a worksheet. This is pretty useful when you design a complicated form to achieve a advanced function. But if you want the complicated form to be modalless, you can not use RefEdit control in the form. Otherwise you will crash Excel and freeze it. Such a disaster! But we can still use this hand control. The idea is create a very simple form in which only a few controls or just one RefEdit control are put. You can use this form to pick up data and transfer the data to the main form. Please download the simple form and VBA code by use the link at the bottom of this page. The procedure used to accept and digest the data is listed as below. To use the downloaded files, just unzip the file and import the form files in VBA editor.

    dim myrange as range
    dim VarInCol as boolean
    Me.Hide
    frmAddVariables.Show
    If frmAddVariables.redVariable.Value <> "" Then
        Set myrange = Range(frmAddVariables.redVariable.Value)
        VarInCol = frmAddVariables.rbtnCol.Value
    End If
    frmAddVariables.Hide
    Me.Show
Download source code ©董占山Zhanshan Dong

Post comments(留言)

Name(名字):

Comment(内容):


由Google提供

SunfineData Products|U's Bargain Network|Contact Me(与我联系)
© 1998-, 董占山, 版权所有, 欢迎转载文章链接。
转载文章和软件请注明出处(http://articles.sunfinedata.com/)。