Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application.Transpose in VBA EXCEL 2003

I have been using Application.Transpose function since Excel 97 first
appeared. It allows to transfer a range of cells values into Variant
array in VBA code without For ...Next loop.

Currently I have switched to Excel 2003 and uncovered that this
construction (Application.Transpose) behaves differently:
Suppose you have inserted a break point inside of the function that
uses Application.Transpose
When execution comes to the point when you use that variant Array
suddenly execution of the function starts again from the beginning of
the routine, and this going on as many times as many elements original
Range consists from!

Does anyone have experienced anything similar?

Please let me know.

Thank you.

Alex

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Application.Transpose in VBA EXCEL 2003

Don't quite understand.

Firstly, you don't need transpose to transfer a range to an array. You can
just do:
Dim arr
arr = Range(Cells(1), Cells(5, 10))

Secondly: starts again from the beginning of the routine
Never seen this, could you give code that demonstrates this?

RBS



"atemesov" wrote in message
oups.com...
I have been using Application.Transpose function since Excel 97 first
appeared. It allows to transfer a range of cells values into Variant
array in VBA code without For ...Next loop.

Currently I have switched to Excel 2003 and uncovered that this
construction (Application.Transpose) behaves differently:
Suppose you have inserted a break point inside of the function that
uses Application.Transpose
When execution comes to the point when you use that variant Array
suddenly execution of the function starts again from the beginning of
the routine, and this going on as many times as many elements original
Range consists from!

Does anyone have experienced anything similar?

Please let me know.

Thank you.

Alex


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Application.Transpose in VBA EXCEL 2003

Dnia 27 Jun 2006 14:15:39 -0700, atemesov napisał(a):

[...]
Currently I have switched to Excel 2003 and uncovered that this
construction (Application.Transpose) behaves differently:
Suppose you have inserted a break point inside of the function that
uses Application.Transpose
When execution comes to the point when you use that variant Array
suddenly execution of the function starts again from the beginning of

[...]

I've just tested this code:

Sub aaa()
Dim v As Variant
' breakpoint below
v = Application.WorksheetFunction.Transpose(Range("C5: E7"))
End Sub

Sub bbb()
aaa
End Sub

Pressing F5 inside bbb executes to breakpoint. Then, after pressing F5 or
F8 debugger behaves OK.

Maybe you have some Loop or recurring _Change event...

--
PL
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
Excel 2003: Transpose (flip, swap, rotate) rows and cells. BJ Martens Excel Worksheet Functions 0 January 22nd 11 06:00 PM
Application.Transpose and Range of dates/data David Welch[_2_] Excel Programming 0 August 10th 05 05:49 PM
How do I transpose an Excel 2003 column of data? LordByron New Users to Excel 2 March 3rd 05 03:33 PM
Excel 2003 and Application.Quit Dean[_6_] Excel Programming 6 June 22nd 04 06:05 PM
Excel 2003 VBA Help for TRanspose is missing Howard Kaikow Excel Programming 6 November 26th 03 09:34 AM


All times are GMT +1. The time now is 03:39 PM.

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

About Us

"It's about Microsoft Excel"