Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form?
I am new in excel VBA programming and now facing a problem is that:
I have a worksheet containing the company details and each company contain a unique ID. I have create a VBA form to list the detail of a specified company using their company ID (I am now hardcode the ID in the form at this moment). I want to allow users to open the VBA form to see the company detail by clicking the company ID in the worksheet. But I do not know how the form link with the company ID in the worksheet. Is it possible to call the VBA form with a link? In addition, is it possible to pass the ID from the worksheet to the form? Or any other solutions. Thanks for helping. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form?
You would use the RefEdit control, and when the user clicks in this
control,. they can access the worksheet, so to select a cell. You then just pickup that value, and get any details associated with it. RefEdit doesn't automatically appear on the toolbox, but you can get it by right-clicking on the toolbox, and clicking Additional Controls. Then scroll down that list to the 'RefEdit Ctrl', and check that item. It will then appear on your toolbox. But I have to ask, why bother. If the data is in a worksheet, you can use DataForms on that worksheet, and Excel does it for you. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Daniel" wrote in message om... I am new in excel VBA programming and now facing a problem is that: I have a worksheet containing the company details and each company contain a unique ID. I have create a VBA form to list the detail of a specified company using their company ID (I am now hardcode the ID in the form at this moment). I want to allow users to open the VBA form to see the company detail by clicking the company ID in the worksheet. But I do not know how the form link with the company ID in the worksheet. Is it possible to call the VBA form with a link? In addition, is it possible to pass the ID from the worksheet to the form? Or any other solutions. Thanks for helping. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pass to textbox on a form and to excel worksheet | New Users to Excel | |||
Using a template form, advance a form number everytime you open | Excel Discussion (Misc queries) | |||
Open a Spread Sheet In a Mdi form In Vb.net | Excel Programming | |||
Pass parameter to a form and then open it? | Excel Programming | |||
link a cell into a vba form | Excel Programming |