Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.29 seconds.

  1. Re: VBA Error window has changed - no more Debug button

    I think it might be because the error is generated by Excel rather than VBA. But as DanteAmor says, you can open the vb editor with Alt + F11 and step through the code to see where the condition...
  2. Re: VBA worksheet change copy values derived by formula to adjacent column in same worksheet in Excel table

    Ok, the multiple paste was not specified in the OP but JoeMo's version should fix that.
    Regards, JLG
  3. Re: VBA worksheet change copy values derived by formula to adjacent column in same worksheet in Excel table

    You can try this. It should work with the table.


    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Cells(Target.Row, 5) <> "" Then Cells(Target.Row,...
  4. Re: saveas workbook in vba - default location

    If you just saved the workbook, it would default to the directory or origin. But if you use SaveAs you wiill need to include the path to the directory where you want to save it, if that directory is...
  5. Re: VBA for setting cell value equal to the found value in a range offset by two columns

    You're welcome,
    Regards, JLG
  6. Replies
    8
    Views
    223

    Re: Renaming an Active Workbook

    When you SaveAs the new workbook name is the ActiveWorkbook and if you do not change the file type from .xlsm it will retain the code. Regardless, the code continues to run in that instance of Excel...
  7. Replies
    8
    Views
    223

    Re: Renaming an Active Workbook

    The only way I know to rename an ActiveWorkbook is to do a SaveAs using a different file name and then kill the old file.. You can rename closed files with code without using the SaveAs.
  8. Re: VBA for setting cell value equal to the found value in a range offset by two columns

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("N199")) Is Nothing Then
    With Sheets("Sheet1")
    .Range("R198").Value =...
  9. Re: VBA: How to remove all extra spaces or a given character in the beginning and end of all cell data?

    1.

    With Sheets(1)
    .Range("A1") = Trim(.Range("A1").Value
    End With
    2.

    With Sheets(1)
    .Range("A1") = Mid(.Range("A1").Value, 2, Len(.Range("A1").Value) - 2)
    End With
  10. Re: Object Variable or With block variable not set error

    I was having a similar problem with IE and found that clicking the Internet Settings and Compatibility View I could enter the offending site into a dialog box and it cleared up the jumping and...
  11. Replies
    1
    Views
    110

    Re: Sum Across Multiple Sheets

    Maybe you can work this into your existing macro. I am not sure how your master sheet is set up so I will let you figure our how to exempt it from the sheets in the folrmula.

    Sub t()...
  12. Replies
    2
    Views
    73

    Re: VBA convert working wrong

    Cross posted: https://www.excelforum.com/excel-programming-vba-macros/1292755-vba-convert-giving-me-wrong-results.html#post5208918
  13. Re: Object Variable or With block variable not set error

    Glad you found the problem.



    Not sure what this means, but the replies you get on the forum depends upon who responds and how they interpret the issue in the OP. All responders are volunteers...
  14. Re: "Copy If" from one workbook to another code?

    Put this in cell C1 of workbook173.xlsm sheet Sales

    =IF([Manifest!B1=[workbookAPI.xlsm]SoldList!D1,[workbookAPI.xlsm]SoldList!A1,"")
  15. Re: Object Variable or With block variable not set error

    It is obviously losing its attributes somewhere between the last place it worked and where you are getting the error. You can either post that part of the code so we can look at it, or you can use...
  16. Re: "Copy If" from one workbook to another code?

    Unless you have SheetX, Cell BE12 formatted as text, remove the quotation marks from the 173 and it should work.
  17. Re: VBA Code to compare Dates, then run macro to match colums

    I set up two sheets with dates in column A beginning at row 3 on both. Some cells were left blank on sheet 2 as in the OP example. I used a fake macro named 'MatchColumns" with both codes being in...
  18. Re: Sub that runs through worksheets and reports an input value on another worksheet

    destSheet.cells(Rows.Count, 1).End(xlUp)(2).Resize(, 3) = fn.Resize(, 3).Value
  19. Re: Sub that runs through worksheets and reports an input value on another worksheet

    this uses a different method to find the value than your code, but it should be a little faster since it eliminates the second For loop. Also in the comment you will see an example of how to put the...
  20. Replies
    3
    Views
    109

    Re: Moving Macro to one file

    That does not make the water any less muddy for me. If you have a macro that produces what you want and just want to run it from a different workbook, the state which workbook it is currently in,...
  21. Replies
    3
    Views
    109

    Re: Moving Macro to one file

    A Macro is just a procedure that tells the computer which actions to take and in which order to take them. It does the same thing that a user would do manually, only a whole lot faster. How the...
  22. Re: VBA Error 1004 - CopyPicture method of Range class failed

    In the macro you posted, just before the 'End Sub' line put:

    Set rBRSelection = Nothing
    That frees the reserved memory for that Object variable. You only need to do it for Object variables, not...
  23. Re: VBA Error 1004 - CopyPicture method of Range class failed

    I am calling the same macro three times, each time extracting a different range.
    The statment does not correspond with this part of your post:

    Sub ExporttoJpg()
    Call ExportOCRangeToPNG
    Call...
  24. Re: VBA Code to compare Dates, then run macro to match colums

    See if this works for you


    Sub t()
    Dim i As Long
    For i = 3 To Sheet1.Cells(Rows.Count, 1).End(xlUp).Row 'If data starts on row other than 3, change accordingly.
    If Sheet1.Cells(i,...
  25. Replies
    1
    Views
    75

    Re: Print All Text Black

    I don't believe there is a printer setting for that in the PageSetup options, but it could probably be done with a macro that sets the

    ActiveSheet.Cells.Font.Color = vbBlack
    ActiveSheet.PrintOut...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4