#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Range quest.

It seems I need to hit the command button twice in order for the code ito do
the rezisng of the range properly. (60 rows and variable number of
columns).If i hit the button only once it resets the range to something
totally different. What is wrong???


Private Sub AddParameters_Click()
Dim i As Integer
Dim EngineRange As Range
Dim Col As Integer
Dim NewEng_Range As Range


Set EngineRange = Range("Eng_Range")
i = 60
Col = 1
Do
Col = Col + 1
EngineRange.Resize(i, Col - 1).Name = "Eng_Range"

Loop Until IsEmpty(EngineRange(Col))

EngineRange.Resize(i, Col - 1).Name = "NewEng_Range"


End Sub

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
How can I get Excel to open a document in a new Window ? NEW QUEST maysi01 Excel Discussion (Misc queries) 2 December 13th 06 12:27 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Sum Product Quest: include an OR? nastech Excel Discussion (Misc queries) 4 August 14th 06 07:40 PM
Can a value from a different cell be the false answer in =If quest Jenna Excel Discussion (Misc queries) 6 June 6th 06 06:21 PM
My Quest with Time!! Philip Excel Worksheet Functions 4 August 24th 05 01:09 PM


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