ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveX Control (TextBox) question (https://www.excelbanter.com/excel-programming/303220-activex-control-textbox-question.html)

Stuart[_5_]

ActiveX Control (TextBox) question
 
Using Excel 2000.

The textbox is embedded directly into the sheet.
When the workbook (with its single sheet) is opened,
the textbox is visible and accessible to the user.

Can I control access to the textbox, so that it is
only accessible under certain conditions?

For example, in the ThisWorkbook module I have
code in the Workbook_Open Event. Can I do
something like:
If ContractMaster = True Then
Enable the Contol
Else
User cannot edit the textbox

Is this possible please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004



Norman Jones

ActiveX Control (TextBox) question
 
Hi Stuart,

To hide the textbox,try:

ActiveSheet.OLEObjects("Textbox1").Visible = True

To prevent editing, try:

ActiveSheet.OLEObjects("Textbox1").Enabled = True


---
Regards,
Norman

"Stuart" wrote in message
...
Using Excel 2000.

The textbox is embedded directly into the sheet.
When the workbook (with its single sheet) is opened,
the textbox is visible and accessible to the user.

Can I control access to the textbox, so that it is
only accessible under certain conditions?

For example, in the ThisWorkbook module I have
code in the Workbook_Open Event. Can I do
something like:
If ContractMaster = True Then
Enable the Contol
Else
User cannot edit the textbox

Is this possible please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004





Stuart[_5_]

ActiveX Control (TextBox) question
 
Many thanks.

Will give them a go.

Regards.

"Norman Jones" wrote in message
...
Hi Stuart,

To hide the textbox,try:

ActiveSheet.OLEObjects("Textbox1").Visible = True

To prevent editing, try:

ActiveSheet.OLEObjects("Textbox1").Enabled = True


---
Regards,
Norman

"Stuart" wrote in message
...
Using Excel 2000.

The textbox is embedded directly into the sheet.
When the workbook (with its single sheet) is opened,
the textbox is visible and accessible to the user.

Can I control access to the textbox, so that it is
only accessible under certain conditions?

For example, in the ThisWorkbook module I have
code in the Workbook_Open Event. Can I do
something like:
If ContractMaster = True Then
Enable the Contol
Else
User cannot edit the textbox

Is this possible please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004




All times are GMT +1. The time now is 01:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com