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+)
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.