0

Hi,

I would like to change the caption of "ADD COMMOND BUTTON" to "SAVE" when it is pressed at run time.

Could somebody is there to help me in this regard.

Thanks in advance.

2
Contributors
3
Replies
4
Views
12 Years
Discussion Span
Last Post by jwshepherd
0
Public Sub Command1_Click()
if command1.caption = "SAVE" Then
command1.caption = "ADD COMMOND BUTTON"
'Put Save commands here
else
Command1.caption ="SAVE"
'put ADD COMMOND BUTTON Commands here
end if
end sub
0
Public Sub Command1_Click()
if command1.caption = "SAVE" Then
command1.caption = "ADD COMMOND BUTTON"
'Put Save commands here
else
Command1.caption ="SAVE"
'put ADD COMMOND BUTTON Commands here
end if
end sub

------------------------------------------------------------------
Dear Sir,

Thanks for your kind reply. If I press the Save button it should change the caption "save" to "add" and when i again press the button "add" it should change its caption "add" to "save". please help.

0
Option Explicit

Public Sub Command1_Click()
If Command1.Caption = "SAVE" Then
Command1.Caption = "ADD"
'Put Save commands here
Else
Command1.Caption = "SAVE"
'put ADD COMMOND BUTTON Commands here
End If
End Sub
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.