Search:

Type: Posts; User: Norie; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 1.63 seconds.

  1. Thread: Code efficiency

    by Norie
    Replies
    5
    Views
    92

    Re: Code effieciency

    Try this.

    1 Create a new class module and name it CmdBtn.

    2 Paste this code in the class module.


    Option Explicit

    Public WithEvents cb As MSForms.CommandButton
  2. Thread: Code efficiency

    by Norie
    Replies
    5
    Views
    92

    Re: Code effieciency

    You could add a class module to handle the click events of the buttons.

    What are their names?

    Is the textbox i.e. tbx800 the same for each button?
  3. Thread: Code efficiency

    by Norie
    Replies
    5
    Views
    92

    Re: Code effieciency

    Where are the command buttons located?
  4. Replies
    22
    Views
    589

    Re: Looping is killing my Excel 365 VBA code!

    Do you have any merged cells in Excel?
  5. Re: VBA to lookup a combo box value in a different worksheet

    If the employee combobox is populated from the list of employees then you don't need Find/Application.Match, the ListIndex of the combobox will correspond directly to the row of the selected employee.
  6. Replies
    22
    Views
    589

    Re: Looping is killing my Excel 365 VBA code!

    Not sure what string you mean, and I can't see your data I'm afraid.:)

    Have you tried stepping through the code and checking what data is actually being pulled from Excel?

    PS Do you have any ...
  7. Re: VBA to lookup a combo box value in a different worksheet

    This code will try and find the value selected in cboEmployee in column B of 'Employee Data' and if it's found will put the value from column C in the corresponding row in the next empty row of...
  8. Replies
    22
    Views
    589

    Re: Looping is killing my Excel 365 VBA code!

    What do you mean by 'adding other lines'?
  9. Replies
    22
    Views
    589

    Re: Looping is killing my Excel 365 VBA code!

    Have you checked what's in the dictionary before you start transferring data to Word?
  10. Replies
    2
    Views
    80

    Re: Userform close throwing error 424

    Have you tried stepping through the code starting in Workbook_Open?
  11. Re: runtime error '380 Could not set the rowsource property. Invalid property value

    Does this work?


    Private Sub UserForm_Initialize()

    With Sheets("Sheet1")
    ComboBox1.List= .Range("A3", .Range("A" & Rows.Count).End(xlUp)).Value
    End With

    ...
  12. Replies
    17
    Views
    352

    Re: VBA - With each table on Activesheet

    Perhaps something like this.


    Sub Add7ToStartDate()
    Dim tbl As ListObject
    Dim col As ListColumn
    Dim rng As Range
    Dim arrData As Variant
    Dim idx As Long
  13. Replies
    2
    Views
    119

    Re: Parse JSON into Excel

    ParseJson in SGOTT2 returns a dictionary with 2 keys, 'statsDetailedType' and 'statsData'.

    The value for the first key is simply the string 'STROKES_GAINED_OFF_THE_TEE', whereas the value for...
  14. Replies
    8
    Views
    232

    Re: Copy columns based on header and array

    Try this.


    Dim sWords As Variant
    Dim Res As Variant
    Dim idx As Long
    Dim idxCol As Long
    Dim cnt As Long

    sWords = Array("Date", "Qty", "Method")
  15. Re: UserForm TextBox.Value type mismatch with variable

    Which line of code is causing the error?
  16. Replies
    6
    Views
    136

    Re: Using Colour Codes in an array

    Mike

    If the values in column 2 are valid colour codes then they should work.

    If you wanted to use the string in the RGB code column you could split it and try something like this.


    arrRGB =...
  17. Re: Write generic code to run from active worksheet

    If you want the code to run for the active sheet of the workbook the code is in try changing ActiveSheet to ThisWorkbook.ActiveSheet.


    Option Explicit

    Sub Create_uploadFile()
    'Copy the active...
  18. Replies
    10
    Views
    143

    Re: VBA Loop Speed - String Search and update

    Perhaps.


    Dim rng As Range
    Dim arrColumnR As Variant
    Dim arrColumnW As Variant
    Dim idxRow As Long

    With Sheets("Keep")
  19. Re: why it will error when i click my assigned macro to initialize userform ??

    How many 'tabs/pages' do you need?
  20. Thread: Error handling

    by Norie
    Replies
    10
    Views
    187

    Re: Error handling

    You can replace it with whatever you want/need, that was only to show how it worked.
  21. Thread: Error handling

    by Norie
    Replies
    10
    Views
    187

    Re: Error handling

    What you can do is something like this.


    Dim Res As Variant

    ' other code
    Set Res = titleElem.getElementsByTagName("p")(0)

    If Not Res Is Nothing Then
    ...
  22. Thread: Error handling

    by Norie
    Replies
    10
    Views
    187

    Re: Error handling

    What happens in the code if 'Sorry...' isn't found?

    Do you get an error along the lines of 'Object not set...'?

    If you do then there's probably a better way to handle it than On Error. and Goto.
  23. Thread: Problem with VBA

    by Norie
    Replies
    5
    Views
    104

    Re: Problem with VBA

    Your code will exit here if any cell other than C23 has been changed.


    If Intersect(Target, Range("C23")) Is Nothing Then Exit Sub

    So the code to check the value of C9 is never reached.
    ...
  24. Thread: Error handling

    by Norie
    Replies
    10
    Views
    187

    Re: Error handling

    James

    What error are you trying to 'handle'?
  25. Replies
    4
    Views
    242

    Re: Maximum Size for a 2 dimensional array

    What problems were you actually having?

    I know there's a limit to how much data you can write back to a sheet in one go but I'm not sure that's a memory issue.

    When I've run into that problem...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4