Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default ShowDataForm disabeling a field



Hello all ,

I want to prompt the user a form in which on of the field is disable meaning
locked.
so I will seen as form like a drop list where the user could insert data
according to one field that is 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 ??



Rony







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabeling Hyperlinks Nathalie Krochmann Links and Linking in Excel 10 June 8th 08 08:41 PM
Locate ShowDataForm on Screen Steve Excel Discussion (Misc queries) 1 August 23rd 07 12:23 AM
ShowDataForm Steve Excel Discussion (Misc queries) 0 August 15th 07 09:48 PM
ShowDataForm method nc Excel Discussion (Misc queries) 4 March 8th 05 10:09 AM
ShowDataForm Initialization Alan Excel Programming 2 February 11th 04 11:24 PM


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"