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: 25
Default Array problem?

I have a user form with a textbox and two command buttons. The command
buttons are named Add and Done. When the user hits add I want the text in
the textbox to be added to a variable array. When the user hits the done
button I want to find each value in the array in the first column of the
active worksheet and replace it with the minimum value from the array.

How do I create this array?

How do I pass the array to the done button click event?

Private Sub Add_Click()
Dim a() As Variant

ReDim Preserve a(UBound(a) + 1)
a(UBound(a)) = textbox1.Text

End Sub

This gives me a subscript out of range message.


 
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
Array problem - TIA S Davis Excel Worksheet Functions 9 November 7th 06 02:22 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM
array use problem NikkoW Excel Programming 5 May 5th 04 01:32 AM
Array Problem Phil Hageman[_3_] Excel Programming 0 November 19th 03 07:34 PM


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