Hi There,
Is it possible to add multiple listbox items into a single array? The code below works for a single Listbox1, how do I add a second Listbox to the end of the first array, e.g. Listbox1
Private Sub CmdOk_Click()
Dim myArray() As String
Dim Count As Integer, i As Integer, j As Integer...
Hi there, I have a form which has a number of checkboxes. Is it possible to capture and store the order in which the checkboxes were selected in an array?
So if there are 20 checkboxes and the user selects CheckBox1, CheckBox3, Checkbox18, I want to capture the Control.Value (which I assume is...
Hi all,
Have a number which can be a 1 or more digits. Max number has thousands separator
Trying to work out a regex to match any of these:
'345' -match '(\d{1,})'
"Number is $($matches[1])"
Works for single digit and 3 digit numbers
and
'3,345' -match '(\d{1}\,\d{1,3})'
works for 4...
Trying to use VBA to create a table using bookmarks in Word 2010 from a Userform with 2 columns and row based on number of checkboxes ticked. Then populate just the first column with predefined text and the row number
The second column, would contain the Caption or name of the checkbox. I...
Thanks whn, I didn't make my question very clear in the first place. I should have said, if the value exists, then do nothing, if not adding the value to that key.
$VAR1 = {
'key2' => [
5,
6,
7...
Hi there,
If I have a Hash of Arrays, how to you find out if a value exists for a given key.
use Data::Dumper;
#populate hash
foreach (1 .. 4) {
push @{ $hash{key1} }, $_;
}
foreach (5 .. 9) {
push @{ $hash{key2} }, $_;
}
So if I wanted to find out if '1' exists in key1, how do I...
Hi There,
I have the following code to import a csv file into Excel:
Sub ImportCSV()
Dim vPath As Variant
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set wb = Excel.ActiveWorkbook
Set ws = Excel.ActiveSheet
vPath = Application.GetOpenFilename("CSV (Comma Delimited) (*.csv),*.csv" _...
Thanks Steve
I have redefined my process a bit:
As I had in my code, I wanted to fork off some commands.
@array = ("30,34,35,40,51.....") #variable size
$arraysize = $#array + 1;
$remainder = $arraysize % 50;
$iterations = sprintf("%d",$arraysize/50);
if ($arraysize >= 50){
for ($i=0,$1 <...
I have an array of integers and the array size is variable ,it is determined at processing time.
What I need to do is to work out how many elements there are in the array and process each element with no more than 50 at a time.
So, if there are 320 elements, then I need to process them in 6...
thanks Annihilannic, that makes perfect sense, but you almost need vulcan mind meld to know the intricacies of what Perl is doing behind the scenes - I guess it just comes with experience.
one last question. So with the split
my ($prefix, @pairs) = split
Perl knows where to split based on the brackets from the regex?
^\s*\d+(?:\s*\d+-\d+)
Both of you deserve a star! Thanks
rharsh, can you please explain in plain english the regex
my stab at it
if (/^\s*\d+(?:\s*\d+-\d+)+\s*$/) {
^\s* # anchor start of line with zero or more spaces
\d+ # one or more digits
(?: # don't assign matches to $1,$2 etc
\s*\d+-\d+)+ #look for...
my mistake, the original format was a csv file:
Date and Time,Number,Total I/O /sec,Reads/Sec
08 09 2007 18:00:00,00:00,2.2733333,0
08 09 2007 18:00:00,00:01,0.033333335,123
08 09 2007 18:00:00,00:02,0.036666665,65
08 09 2007 18:00:00,00:03,1.1433333,34
08 09 2007 18:00:00,00:04,0,34
so will...
hi prex1,
thanks, awesome job. Eventually want to take each block of data and create Excel tabs for each one (probably Perl OLE) so I can graph the result, but this has gone a long way to help.
Date and Time 00:00 00:01 00:02 00:03 00:04 00:05 00:06 00:07 00:08 00:09 00:0A
08 09...
I've tried modifying the code. The only thing I managed to get working was
push @{$data{$fields[1]}}, [@fields[0..5]];
to include more columns
but I can't work out how to transpose the individual column data and organise by the column 2 (whatever it is)
So far I've put some pseudocode...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.