LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Passing array of strings to excel

Hello.

I'm trying to pass data array to Excel.

If the data is an array of (short?) strings, it works.
If the data is an array of (long?) strings it fails.
If I pass each item from the array of (long?) strings separately, it
works again!

WTF?

I have deduced the problem to the simplest case:
passing array of two (two!) items. The code is below (Excel VBA)

(The full code is placed code he
http://nbelyh.googlepages.com/fail.zip)

Dim v(1 To 2, 1 To 1) As String

v(1, 1) = a
v(2, 1) = b

Set rg1 = ws.Range("A1")
rg1.Value2 = v(1, 1) ' works

Set rg2 = ws.Range("A2")
rg2.Value2 = v(2, 1) ' works

Set rg = ws.Range(rg1, rg2)
rg.Value2 = v ' <---- fails he Error 1004

(values "a" and "b" are rather long, find'em in attached file)

Any guess?
Kind regards, Nikolay

 
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
Passing strings as arguments to xll functions. JacksonRJones Excel Programming 0 March 24th 06 03:37 PM
Passing array of strings from DLL function to VBA Jag Man Excel Programming 0 January 12th 04 10:09 PM
passing strings vba man Excel Programming 0 December 21st 03 07:12 PM
passing strings pabs[_7_] Excel Programming 2 December 19th 03 06:25 PM
passing strings Sirron Excel Programming 2 August 27th 03 04:33 PM


All times are GMT +1. The time now is 04:38 AM.

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"