Code Comments
Programming Forum and web based access to our favorite programming groups.
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
Post Follow-up to this message"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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.