Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Selection Code

Consider the following:
Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(CurrentRow, 9).Select
Selection.Locked = False
Selection.FormulaHidden = False

Is there a way to combine the two select statements into just one?

Thanks,
Bernie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Selection Code

With Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7))
.Locked = False
.FormulaHidden = False
End With
With Cells(CurrentRow, 9)
.Locked = False
.FormulaHidden = False
End With

--

HTH

RP
(remove nothere from the email address if mailing direct)


"bw" wrote in message
...
Consider the following:
Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(CurrentRow, 9).Select
Selection.Locked = False
Selection.FormulaHidden = False

Is there a way to combine the two select statements into just one?

Thanks,
Bernie




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Selection Code


Hi,
The following (not tested) doesn't really combine the two operations but it
does avoid the need to select

With Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7))
.Locked = False
.FormulaHidden = False
End With
With Cells(CurrentRow, 9)
.Locked = False
.FormulaHidden = False
End With

Don


"bw" wrote in message
...
Consider the following:
Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(CurrentRow, 9).Select
Selection.Locked = False
Selection.FormulaHidden = False

Is there a way to combine the two select statements into just one?

Thanks,
Bernie



  #4   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Selection Code

Thanks for the replies!

I should have been more specific in my question.
The following two select statements:

Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select
Cells(CurrentRow, 9).Select

can be combined into a single statement as follows:
Range("A1:G1,I1").Select

So how do I express the single statement using the variable "CurrentRow"?

Thanks,
Bernie

"bw" wrote in message
...
Consider the following:
Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(CurrentRow, 9).Select
Selection.Locked = False
Selection.FormulaHidden = False

Is there a way to combine the two select statements into just one?

Thanks,
Bernie



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
cell selection code NDBC Excel Discussion (Misc queries) 6 August 11th 09 06:39 AM
Help with selection code Jeff[_45_] Excel Programming 4 February 14th 05 04:37 PM
Cell selection code ToddG Excel Programming 2 September 22nd 04 09:26 PM
Need Code For Selection SMILE Excel Programming 3 August 10th 04 12:34 PM
Selection code sixfivebeastman Excel Programming 3 May 27th 04 08:54 PM


All times are GMT +1. The time now is 08:56 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"