Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default XValues and values.

How may I set up, via VBA, Xvalues and Values obtained by user via a user form?

I'm goind mad about this thing! It's two days I'm on.

Thanks to all that answered me last two days but I thougth easier doing this thing. It's getting too
hard for me.

Whatever is the problem? Range convert to array or viceversa? Why is so diffucult to accomplsh this
target?

Thanks in advance.

Alex.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default XValues and values.

Hi Alex,

XValues and Values property can accept the Array or Range type. I am not quite familiar with your user form design. For receiving the Array, you
will need to convert the string value from the user input. For example:
'-----------------------------------
Dim sArray as String
Dim oArray()
sArray = InputBox( "Input the Value array with comma splited" )
oArray = Array(sArray)
'Then you can specify the oArray to the Values or XValues property directly.
'...
'-----------------------------------

From my view, for the data from the User Form, I'd suggest you can retrieve the string of the ranges for XValues and Values. Your user can only
need to specify the Range string to the input box, then using the codes below will set the Range to XValues and Values respectively. If the
inputed range string is not valid. Inputbox will reports error to the user.

Dim oXValues as Range
set oXValues = InputBox(prompt:="range for XValues", type:=8)
Charts("Chart1").SeriesCollection(1).XValues = oXValues

Dim oValues as Range
set oValues = InputBox(prompt:="range for Values", type:=8)
Charts("Chart1").SeriesCollection(1).Values = oValues

Please feel free to let me know if you have any further questions.

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


  #3   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default XValues and values.

Once more time useful.
Thanks!

Wei-Dong XU [MSFT] wrote:

Hi Alex,


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default XValues and values.


My pleasure!

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


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
xl2007 - Reading Values and XValues Greg Wilson Charts and Charting in Excel 0 March 1st 09 06:33 PM
.Values / .XValues modification baconcow Excel Discussion (Misc queries) 4 September 29th 08 11:06 PM
Displaying XValues and Values for chart using VBA Barb Reinhardt Charts and Charting in Excel 2 January 13th 06 01:34 AM
.XValues syntax problem JF_01 Charts and Charting in Excel 1 December 19th 05 08:21 PM
Problem with plotting a chart when using arrays as Values and Xvalues [email protected] Charts and Charting in Excel 3 August 19th 05 09:05 PM


All times are GMT +1. The time now is 06:03 AM.

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"