Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

syntax qustion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
x taol - 21 Jan 2007 22:31 GMT
Sub Button1_Click()
Dim xVar(1 To 4, 1 To 3)
For k = 1 To 4
   ax = k + 1: bx = k + 2: cx = k + 5
   xVar(k) = Array(ax, bx, cx)' error
Next
[a2:c5].Value = xVar
End Sub

this code figure out error.
i want to work fast performance. and thus,
i want to run without for loop.

xVar(k,1 to 3) = Array(ax, bx, cx)
or
xVar(k,1:3) = Array(ax, bx, cx)

how can i syntax?????
Tom Ogilvy - 22 Jan 2007 00:17 GMT
you can't put your values in using that method.

Sub Button1_Click()
Dim xVar(1 To 4, 1 To 3)
For k = 1 To 4
   xVar(k,1) = k + 1
   xVar(k,2) = k + 2
   xVar(k,3) = k + 5
Next
[a2:c5].Value = xVar
End Sub

Signature

Regards,
Tom Ogilvy

> Sub Button1_Click()
> Dim xVar(1 To 4, 1 To 3)
[quoted text clipped - 16 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.