Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old November 8th 18, 03:10 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2013
Posts: 37
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 04:15 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017