Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 1.93 seconds; generated 10 minute(s) ago.

  1. Re: Referencing controls on a userform that was created dynamically

    Andy

    How would using a class module not work for you?

    Can you post your entire code for creating the userform?

    Have you considered using both methods?

    PS How about using a listbox?
  2. Replies
    2
    Views
    15

    Re: CopyPaste copying headers

    Check the value of lrw, if it's 1 then there's no data to copy and the header will be copied so skip the sheet



    Sub Collate_Sheets()
    Dim ws As Worksheet, sh As Worksheet
    Dim lr As Long, lrw...
  3. Re: Referencing controls on a userform that was created dynamically

    Andy

    Instead of dynamically creating a userform why not dynamically create the controls on an existing userform and then use a class module to handle the events of the controls?
  4. Replies
    2
    Views
    62

    Re: What do the @ symbols do in formulas

    The @ symbols mean the formula refers to the current row of each of the columns Rate, MinHours and AddHour.
  5. Re: Referencing controls on a userform that was created dynamically

    Andy

    Where is the code you are trying to reference the dynamically create controls from located?

    Is the form loaded/showing?

    If so, how are you doing that?
  6. Thread: Collections

    by Norie
    Replies
    5
    Views
    85

    Re: Collections

    As far as I can see the collection coll is a collection of clsStudent objects.

    So if you were looping through that collection it would make sense that the loop variable, e.g. oData, was the same...
  7. Replies
    7
    Views
    96

    Re: VBA to search for values and delete rows

    Something like this perhaps.


    Sub Cdelete()
    Dim idx As Long
    Dim arrNames As Variant

    arrNames = Array("NAME", "NAME1", "NAME2")

    For idx = LBound(arrNames) To UBound(arrNames)
  8. Replies
    2
    Views
    69

    Re: Struggling with nested functions

    Perhaps.

    =IF(AND(A1="", B2="", A2<>"", B1<>""), A2, "")
  9. Re: VBA in Excel to format all tables in Word document

    Steve

    If you are using late-binding you need to either replace the constant wdAutoFitWindow with its actual value or declare an appropriate constant.


    Const wdAutoFitWindow = 2
  10. Re: VBA in Excel to format all tables in Word document

    Steve

    What happens if you remove On Error...?

    Do you get any errors then?

    P.S. Are you using early or late binding?
  11. Replies
    6
    Views
    215

    Re: Round up time by quarter of the hour in VBA

    Try this.


    For Each Cell In Range("C2:C" & Cells(Rows.Count, 3).End(xlUp).Row)
    If Cell.Value = "MATCH" Then
    Cell.Offset(, 1).Value =...
  12. Thread: Overpass API

    by Norie
    Replies
    6
    Views
    250

    Re: Overpass API

    You could probably use XMlHttp for this.

    Something like this, which is a bit rough and requires a reference even though I tried using late binding.




    Sub test()
    Dim http As Object
    Dim...
  13. Replies
    4
    Views
    124

    Re: userform.Listbox don't show item

    You use .AddItem to add a row and then you loop through the fields of the record and use List() to add the data to the new row.
  14. Replies
    4
    Views
    124

    Re: userform.Listbox don't show item

    fabrizio

    If there's only one item/record use AddItem to add it to the ListBox, it's as simple as that - no need to have a separate function for transposing.
  15. Re: Convert a shape (group) into a picture inside wrksheet using VBA

    I think the best you could do would be this.


    Sub copy_and_paste_as_picture()

    ActiveSheet.Shapes.Range(Array("Group 5")).Copy
    ActiveSheet.Pictures.Paste

    End Sub
  16. Re: Insert Command Button to reset multiple Data Validation Dropdowns using VBA

    Try this.


    Private Sub CommandButton1_Click()
    Dim rngDV As Range
    Dim lst As Variant


    For Each rngDV In Sheets("SheetA").Cells.SpecialCells(XlCellType.xlCellTypeAllValidation)
  17. Thread: Max IF formula

    by Norie
    Replies
    14
    Views
    196

    Re: Need help with a Max IF formula

    Carla

    Try this and enter the formula with CTRL+SHIFT+ENTER.

    =MAX(IF(('% Complete'!$A$1:$A$7=A1),'% Complete'!$B$1:$B$7))
  18. Replies
    7
    Views
    136

    Re: Saving worksheet as image

    Could you not export the data for the charts as well, perhaps in a hidden sheet?
  19. Replies
    7
    Views
    136

    Re: Saving worksheet as image

    What you could do is use the Export method of the charts to save them as images and then add the saved images to a sheet in the workbook you are emailing.

    Obviously you would lose any of the...
  20. Replies
    9
    Views
    173

    Re: Userform opens twice

    Sounds to me as though this is triggering the Activate event again.


    Range("A4").Select
  21. Replies
    7
    Views
    136

    Re: Saving worksheet as image

    Is it a chart you want to send as an image?
  22. Re: Insert Command Button to reset multiple Data Validation Dropdowns using VBA

    How have you set up the lists in the data validation?

    If it's simply by using something like 1,2,3,4,5 you could try this.


    Sub ResetDV()
    Dim rngDV As Range
    Dim lst As Variant
  23. Replies
    9
    Views
    173

    Re: Userform opens twice

    How are you closing the userform?
  24. Replies
    9
    Views
    173

    Re: Userform opens twice

    Try putting a breakpoint here,


    Private Sub Worksheet_Activate()

    then active the relevant sheet, and when the code goes into break mode you can step through line by line with F8 and find out...
  25. Re: [VBA] Case like "X", "Y", "Z", "" not working

    I don't have time right now to look at the other thread but based on what you've posted here this is what I came up with.

    Obviously it's untested and it's longer than the solution you posted but,...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4