Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
XValues and values.
Once more time useful.
Thanks! Wei-Dong XU [MSFT] wrote: Hi Alex, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xl2007 - Reading Values and XValues | Charts and Charting in Excel | |||
.Values / .XValues modification | Excel Discussion (Misc queries) | |||
Displaying XValues and Values for chart using VBA | Charts and Charting in Excel | |||
.XValues syntax problem | Charts and Charting in Excel | |||
Problem with plotting a chart when using arrays as Values and Xvalues | Charts and Charting in Excel |