Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. stevio

    Multiple Listboxes into single array

    Thank you Andy Could be multiple - let's say it was up to 10 listboxes, is there an easy way to "compact" the code? Thanks again Stevio
  2. stevio

    Multiple Listboxes into single array

    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...
  3. stevio

    Word VBA - finding which order checkboxes are selected

    Sorry, a VBA Userform in Word. Cheers Steve
  4. stevio

    Word VBA - finding which order checkboxes are selected

    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...
  5. stevio

    Regex Number with or wothout thousands separator

    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...
  6. stevio

    Word VBA - Create Table and Populate

    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...
  7. stevio

    Find if Hash Value exists in Hash of Arrays

    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...
  8. stevio

    Find if Hash Value exists in Hash of Arrays

    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...
  9. stevio

    Import CSV into Excel by Column Name

    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" _...
  10. stevio

    Process Array in batches

    IT solved the problem, thank you.
  11. stevio

    Process Array in batches

    Steve, Are you saying threads are better than using fork? Would fork achieve what I need to do?
  12. stevio

    Process Array in batches

    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 <...
  13. stevio

    Process Array in batches

    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...
  14. stevio

    Regex multiple times per line

    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.
  15. stevio

    Regex multiple times per line

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

    Regex multiple times per line

    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...
  17. stevio

    Regex multiple times per line

    Have the following data in a text file: 0 0-0 1-0 2-0 3-0 0-1 1-1 2-1 1 0-2 1-2 2-2 3-2 0-3 1-3 2-3 2 0-4 1-4 2-4 3-4 0-5 1-5 2-5 3 0-6 1-6 2-6 3-6 0-7 1-7 2-7 ... etc...
  18. stevio

    Parsing CSV file

    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...
  19. stevio

    Parsing CSV file

    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...
  20. stevio

    Parsing CSV file

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

Part and Inventory Search

Back
Top