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: 13
Default Problem in Excel...String of Ranges?

Is it possible to have a user select multiple cells associated with a
sample? My vba is below, but it keeps giving me an error on having the
InputBox = type 8 (range). Is this not possible? I figured it would
be fine to have the layout like this...but if someone knows of a better
way that would work it would be fine.

Sub Cmpds()

Dim Compounds() As String
Dim numCompounds As Long
Dim cnt As Long
numCompounds = InputBox("Enter the Number of Compounds")
ReDim Compounds(1 To numCompounds)
For cnt = 1 To numCompounds
Compounds(cnt) = InputBox("Please Enter Compound " & cnt)
Next

Dim CmpdRng() As String
Dim count As Long
ReDim CmpdRng(1 To numCompounds)
For count = 1 To numCompounds
CmpdRng(cnt) = InputBox("Please Select Data for Compound " &
count, Type:=8)
Next

End Sub

 
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
Delete named ranges beginning with a string GoFigure[_7_] Excel Programming 2 December 4th 05 12:23 PM
String problem. Mannyluk Excel Programming 1 October 16th 04 08:43 PM
Excel VBA - String concatanation problem RyanVM Excel Programming 4 August 3rd 04 05:58 PM
string problem pwz Excel Programming 2 June 20th 04 06:11 PM
SQL string problem TLowe Excel Programming 15 June 11th 04 10:56 AM


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