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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by stevio

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

Part and Inventory Search

Back
Top