Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Why does this keep blowing chunks

Dim oUsedRange as Excel.Range
Dim oRange as Excel.Range

oUsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange <-- Blows up here with member not
found

Next


P.S. I'm using VB.NET so there is no SET statement

Many Thanks in Advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Why does this keep blowing chunks

Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Jon Turner" wrote in message
...
Dim oUsedRange as Excel.Range
Dim oRange as Excel.Range

oUsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange <-- Blows up here

with member not
found

Next


P.S. I'm using VB.NET so there is no SET statement

Many Thanks in Advance




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Why does this keep blowing chunks

Jon, Chip..

the crucial mistake is forgetting SET
SET oUsedRange = WorkSheets("Employees").UsedRange



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Chip Pearson" wrote:

Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Why does this keep blowing chunks

As the original poster indicated, he is writing in VB.NET, which
has no Set statement.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"keepITcool" wrote in message
...
Jon, Chip..

the crucial mistake is forgetting SET
SET oUsedRange = WorkSheets("Employees").UsedRange



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Chip Pearson" wrote:

Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Why does this keep blowing chunks

I appended Cells but still does the same. Any other suggestions ? TIA

UsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange.Cells <-- Blows up here with
member not found

Next



"Chip Pearson" wrote in message
...
Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Jon Turner" wrote in message
...
Dim oUsedRange as Excel.Range
Dim oRange as Excel.Range

oUsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange <-- Blows up here

with member not
found

Next


P.S. I'm using VB.NET so there is no SET statement

Many Thanks in Advance








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Why does this keep blowing chunks

You don't use Set in VB.NET


"keepITcool" wrote in message
...
Jon, Chip..

the crucial mistake is forgetting SET
SET oUsedRange = WorkSheets("Employees").UsedRange



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Chip Pearson" wrote:

Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Why does this keep blowing chunks

Programmer Error. Problem fixed.

How do I go about querying an individual cell in the WorkSheet.Range.Cells
collection ?
I want to find out each cell's value and column name.

TIA





"Jon Turner" wrote in message
...
I appended Cells but still does the same. Any other suggestions ? TIA

UsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange.Cells <-- Blows up here with
member not found

Next



"Chip Pearson" wrote in message
...
Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Jon Turner" wrote in message
...
Dim oUsedRange as Excel.Range
Dim oRange as Excel.Range

oUsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange <-- Blows up here

with member not
found

Next


P.S. I'm using VB.NET so there is no SET statement

Many Thanks in Advance








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Why does this keep blowing chunks

oRange.Value

oRange.column

Not sure what a column Name is, but using integers has always been
sufficient for me.

--
Regards,
Tom Ogilvy


"Jon Turner" wrote in message
...
Programmer Error. Problem fixed.

How do I go about querying an individual cell in the WorkSheet.Range.Cells
collection ?
I want to find out each cell's value and column name.

TIA





"Jon Turner" wrote in message
...
I appended Cells but still does the same. Any other suggestions ? TIA

UsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange.Cells <-- Blows up here with
member not found

Next



"Chip Pearson" wrote in message
...
Jon,

Your code should work as written. Try appending Cells to your
oUsedRange variable. E.g.,

For each oRange in oUsedRange.Cells


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Jon Turner" wrote in message
...
Dim oUsedRange as Excel.Range
Dim oRange as Excel.Range

oUsedRange = WorkSheets("Employees").UsedRange
For each oRange in oUsedRange <-- Blows up here
with member not
found

Next


P.S. I'm using VB.NET so there is no SET statement

Many Thanks in Advance










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
saving a big spreadsheet in chunks [email protected] Excel Discussion (Misc queries) 6 December 18th 06 10:13 PM
Search and replace chunks of html code method373 Excel Discussion (Misc queries) 0 March 27th 06 03:46 PM


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