Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.08 seconds.

  1. Thread: Returning Home

    by Yongle
    Replies
    1
    Views
    24

    Re: Returning Home

    If you know how to get a workbook to save and close after inactive time

    amend the code you have and ...
    .. instead of saving and closing


    With Sheets("Sheet1")
    .Activate
    ...
  2. Replies
    23
    Views
    361

    Re: VBA to find next value

    :confused: I can only help if you tell me where to find the value in ReadData and also what the condition(s) should be

    Do we need to add a condition to test the value of Bench before trying to...
  3. Replies
    23
    Views
    361

    Re: VBA to find next value

    OK
    - this will convert those values which can be converted and skip over those values that cannot be converted to double
    - all the values being used in the code are type Double

    Replace this...
  4. Replies
    23
    Views
    361

    Re: VBA to find next value

    There are lines where VBA cannot evaluate CDbl(Split(ReadData, ";")(19))


    If UBound(Split(ReadData, ";")) >= 18 Then
    is not consistent with
    OP915 = CDbl(Split(ReadData, ";")(19))

    Try

    If...
  5. Replies
    23
    Views
    361

    Re: VBA to find next value

    Test this instead

    Const TestPlan = "28384347"

    Sub Copyfromtext()
    Dim Prod As Range, TestPlancc As String, s As Long, i As Long, TextFile() As String, ReadData As String, ValT As Variant, Code...
  6. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    OOPS :oops::oops:

    Ignore above post
    - I spotted a mistake
    - I will post again in a few minutes
  7. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    Please test this code
    - amendments mades without testing it in any way

    1. Tests for CODIGO and NUM OP amended - this has (hopefully :confused:) corrected the End of File error
    2. The rest of...
  8. Re: Restrict Duplication Of A Whole Row When Entering New Data Using VBA Form

    Thanks for your feedback
    :beerchug:
  9. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    Been busy today. Will post tomorrow
  10. Re: Restrict Duplication Of A Whole Row When Entering New Data Using VBA Form

    To avoid repeating the code to update different sheets, it would be better to create a procedure to do that and use a variable to point it at the correct sheet

    1 Add this sub in userform module
    ...
  11. Replies
    9
    Views
    293

    Re: VBA: Replace X with X @ Col X

    if D and E (per post#8)

    For Each cel In ws.Range("C2", ws.Range("C" & ws.Rows.Count).End(xlUp))
    If cel = "Poster" Then cel.Offset(, 1).Resize(, 2).ClearContents
    Next cel

    if D...
  12. Re: Vba code to replace with chr(13) with space for selected text in powerpoint

    Thanks for the feedback
    :beerchug:
  13. Replies
    9
    Views
    293

    Re: VBA: Replace X with X @ Col X

    How about


    For Each cel In ws.Range("F2", ws.Range("F" & ws.Rows.Count).End(xlUp))
    If cel = "index" Then cel.Offset(, -2).Resize(, 2) = Array(16, "Index")
    Next cel
  14. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    Simply post the code
    - I will look at it later today or maybe tomorrow
    - instead of repeating perhaps a loop calling a function could be used to make the code much shorter

    thanks
  15. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    @Jaafar Tribak - agreed - I phrased that rather badly :oops: Thanks for the catch
  16. Re: Vba code to replace with chr(13) with space for selected text in powerpoint

    Here you go
    - select a single block of text within a shape and run the code


    Sub ReplaceSelectedText()
    Dim Shp As Shape, Pos As Long, LenSelTxt As Long, lenShpTxt As Long
    Dim SelTxt As...
  17. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    The whole of this thread has been about command buttons. It is no wonder you managed to befuddle me. The object in the gif whose text is made bigger is a combobox not a command button :laugh:
    Thank...
  18. Replies
    14
    Views
    379

    Re: Hide column and rows based on values

    Very lazy :laugh:
    - but test to see if causes you any issues
    - amend the password


    Private Sub Worksheet_Change(ByVal Target As Range)
    Const PW = "password"
    Me.Unprotect PW
    ...
  19. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    Fluff ;)
  20. Replies
    14
    Views
    379

    Re: Hide column and rows based on values

    Your amended code works perfectly ;)

    Have you inadvertently disabled events or does the macro reset button need pressing ?

    Easiest way to test is to quickly close Excel completely and then...
  21. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    I am obviously missing a trick here :confused:

    {ALT} 1 code: UserForm1.Show
    The command button on userform code: Selection.Font.Size = 20

    in Design Mode BEFORE opening the userform, the sheet...
  22. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    I think we need to start again :banghead:

    In post#1 you said "At one point I need to find the value for "Code" which is a number" . I provided a solution.
    Then you told me (in post#7) that "In...
  23. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    but how are you selecting an active-x command button on the worksheet ?
  24. Replies
    23
    Views
    361

    Re: Help VBA to find next value

    I read your post on my phone earlier and did not spot your error - my eyes are old ...;)
    Remove the apostrophe '

    BAD

    If InStr(1, Split(ReadData, ";")(0), "NUM OP") > 0 Then
    ...
  25. Re: [VBA] manually-select ActiveX commandbuttons & change font size

    I am intrigued - how are you making that work ?:confused:
    Active-X command button cannot be selected unless user switches to Design Mode but macros are disabled when in Design Mode
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4