ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A problem in VB (https://www.excelbanter.com/excel-programming/285078-problem-vbulletin.html)

JF[_3_]

A problem in VB
 
im just wondering if anyone can figure out the code to
the following problem ( this is driving me spare): im
using office xp, i want a check box that when checked
will allow you to click a seperate button and it will
then speak the text content of a cell, but when unchecked
if you click the button it wont speak the text.

i know it soundsw long and complex but any help will be
apriciated, thanks.

JF

Pikus[_3_]

A problem in VB
 
In the Check Box:

Private Sub CheckBox1_Change()
If CheckBox1.Value = True Then
CommandButton1.Enabled = True
Else
CommandButton1.Enabled = False
End If
End Sub

In the Button:

Private Sub CommandButton1_Click()
MsgBox Cells(1, 1).Value
End Sub

Cells(1, 1).Value points to cell "A1".
(2, 1) would point to "A2".
(1, 2) would point to "B1" and so forth...

Be sure to have the button saved witht the "Enabled"
property set to "False".

- Pikus
-----Original Message-----
im just wondering if anyone can figure out the code to
the following problem ( this is driving me spare): im
using office xp, i want a check box that when checked
will allow you to click a seperate button and it will
then speak the text content of a cell, but when unchecked
if you click the button it wont speak the text.

i know it soundsw long and complex but any help will be
apriciated, thanks.

JF
.



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

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