Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Code does not select

I have this code

Dim Bruger As String
Bruger = UCase(InputBox("Indtast brugernavn"))
If Bruger = "BUTTERFLY" Then
ActiveSheet.Unprotect
Range("2:2,4:4,8:8").Select
Selection.Locked = False
ActiveSheet.Protect Contents:=True
ActiveSheet.EnableSelection = xlUnlockedCells
Else
ActiveSheet.Unprotect
Cells.Select
Selection.Locked = True
ActiveSheet.Protect
Exit Sub

For some reason it doesn't select anything, though it did on thr very first run.

Any ideas.

Jan
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
VBA code to select rows ub Excel Discussion (Misc queries) 4 February 16th 09 12:05 AM
select Range Code Soniya[_4_] Excel Programming 1 November 30th 05 05:14 PM
How do I select this range using code? TBA[_3_] Excel Programming 2 January 14th 04 10:28 PM
Code to Select Row David McRitchie[_2_] Excel Programming 0 September 19th 03 11:02 PM


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

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

About Us

"It's about Microsoft Excel"