Home > Archive > Visual Basic > October 2004 > I need hepl with disabeling filed with the ActiveSheet.ShowDataForm procedure
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
I need hepl with disabeling filed with the ActiveSheet.ShowDataForm procedure
|
|
|
|
Hello all ,
I want to prompt the user a form in which on of the field is disable meaning
locked.
where
"testRight" is the sub range of fields that I want to remain locked
"testLeft" is the sub range of fields that I want to remain locked
"SubForm" the hole form which includes the headings
"testAll " is the range of all the form I want to deal with
for example I got this code :
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 27/10/2004 by rony
'
' Keyboard Shortcut: Ctrl+r
'
Dim rngDatabaseForUserForm As Excel.Range
ActiveSheet.Unprotect
With ActiveSheet.Range("testRight")
.Locked = False
End With
Selection.FormulaHidden = False
With ActiveSheet.Range("SubTest")
.Interior.ColorIndex = 45
.Interior.Pattern = xlSolid
.Interior.PatternColorIndex = xlAutomatic
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
Set rngDatabaseForUserForm = ActiveSheet.Range("SubTest_UserForm")
rngDatabaseForUserForm.Name = "Database"
ActiveSheet.ShowDataForm
ActiveSheet.Unprotect
With ActiveSheet.Range("testRight")
.Locked = True
.FormulaHidden = False
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
can any one help me with this ??
is it possible to da that ? instead of creating your own new form?
And if it does so how
thanks in advance
Rony
| |
| Jeff Johnson [MVP: VB] 2004-10-27, 8:55 pm |
|
"rony" <decoy@hotmail.com> wrote in message
news:clp0g3$2ve$1@sparta.btinternet.com...
> Sub Macro5()
> '
> ' Macro5 Macro
> ' Macro recorded 27/10/2004 by rony
> '
> ' Keyboard Shortcut: Ctrl+r
> '
You used the word "macro." This suggests that you are using VBA from an
Office product. This group is for writing programs in full-blown VB. I
recommend asking your question in the group dedicated to VBA for your
particular product. Examples:
microsoft.public.excel.programming
microsoft.public.word.vba.general (or a more specific group in this
hierarchy)
microsoft.public.access.modulesdaovba
microsoft.public.outlook.program_vba
|
|
|
|
|