vbcrlf

  1. S

    Syntax errors

    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: Syntax Error: Function TotalAdder(RCell As Range) 'Begins Error Handling Code On Error GoTo Helper Dim xIndex As Long Application.Volatile xIndex = RCell.Worksheet.Index nsheet = Left(Tname...
  2. S

    Workbook Closing closes other open workbooks

    I have the code below in a workbook. When I close the workbook, it typically kills all other open workbooks of excel. However, excel has started opening a blank window (no loaded workbook) in a second window whenever opening any excel file. Anybody have ideas on both of these. Further, sometimes...
  3. P

    Conditional Copy, Paste to Another Sheet, Return to Start

    Greetings, I have a Workbook for tracking change orders. When an ECO is closed, I select any cell in the row and run the following to erase the data and clear the formatting on that row. Sub Clear_ECO() MSG1 = MsgBox("This action cannot be undone!" & vbCrLf & vbCrLf & "Selected Row is: " &...
  4. F

    VBA to Send or Display Email

    I have a code that sends an email with pdf attachment. I have a dropdown in cell L3 with options Display and Send. Depending on what is chosen I want to either Display or Send the email. I can't seem to get the code to work. Any help would be appreciated. Below is the email section of my code...
  5. gheyman

    Access: Modify VBA code from an On Open to On Click

    I have code that I successfully run for one of my forms "On Open". I am trying to modify this for another form where the code is run when I click a button on the form Private Sub Form_Open(Cancel As Integer) On Error GoTo Error_Handler If Nz(DLookup("UserName", "tbl_Users", _...
  6. J

    Expanding a working code in Workbook_BeforeSave to more sheets with small alterations? VBA

    Hi experts! I'm fairly new to VBA to say the least, but I have managed to piece together a code that works and does exactly what I want it to. The code looks as follows: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim Rng1 As Range Dim Rng2 As Range...
  7. S

    Workbook Coding Effecting other workbooks

    I have a workbook that seems to cause errors with other workbooks. It seems random but usually the error is 9- subscript out of range Ideas on this? Here's an example of code that kicked when I opened another workbook Function PrevSheet(RCell As Range) 'Begins Error Handling Code On Error...
  8. S

    Function kicking error with two workbooks

    I have two workbooks identically named- one is the master and one a working copy. If I open both, the second one opening kicks an 9- out of script error. What causes this? Function PrevSheet(RCell As Range) 'Begins Error Handling Code On Error GoTo Helper Dim xIndex As Long...
  9. J

    Pop up message

    Hi, have these codes to remind me bill payments (this workbook has two sheets) the problem having if I am working the other sheet when times for the pop up get error message is there any way the message pop up even I am the other sheet. codes: Sub popup()Dim lstRow As Long Dim i As Long Dim...
  10. S

    Userform close throwing error 424

    Good Morning, My pride and joy massive workbook started kicking an error for one of the employees and I haven't realized why yet. As some of you know, when opening the workbook, it runs a series of useforms so that the workbook looks and runs like a "real" program, not an excel book. Anyway...
  11. N

    Update a combo box

    Hello, I have the following code on my userform "frmPOS" to check if any entered client name if exist or not, if so, get the ID and mobile to txtID and txtMobile If not, pop up msg that this is not exist and if I need to add a new client, if so, show the form "frmNewClient" and add new client...
  12. S

    Error Closing Userform

    I'm popping an error when I hit the "X" closing a userform. Here's the code that should close it. Am I missing something obvious? thanks! Private Sub Userform_QueryClose(cancel As Integer, closemode As Integer)On Error GoTo Helper If closemode = 0 Then 'Application Closer If...
  13. J

    VBA toggle file path

    I have a macro to take a worksheet, export it to PDF, save the file, then email it to a client (basically an invoicing spreadsheet). Almost always, I want to save the exported PDF to the same default file, but very occasionally I might want to save it somewhere else. Currently, I always have...
  14. B

    Excel VBA Chr(13), vbNewLine, & vbCrLf Not Working

    Hi all, I am writing a script that will run once a day through windows task manager, then send out an automatic e-mail alert with the returned data. I have set variables with the message body, but the vbNewLine, vbCrLf is not working. The message is received with all the text on a single line...
  15. T

    VPA problem / Automatic pdf file saved in folder and send out via outlook out of a Print area

    Good day, I have an urgent problem with my code. I have this code from an Internet side and added it a bit with the help of Youtube tutorials. This code works perfectly fine for all my Excel sheets i just need to change the folder every time the rest stays the same. But now i have a new sheet...
  16. J

    Setting the name of a PDF file export

    Hey there! I have some VBA code that I slightly adapted from the internet and it's working pretty well. The code takes a page on my workbook, exports it to a PDF, then attaches it to an email. I work for a non-profit and I'm hoping to use this to speed up invoicing for some of our training...
  17. M

    Excel Listbox displays default value but does not retain in within Sub (unless you click on selection)

    0 <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" title="This question does not show any research effort; it is unclear or not useful" aria-pressed="false" aria-label="down vote" data-selected-classes="fc-theme-primary" style="margin: 2px; box-sizing: inherit; font...
  18. B

    SQL statement is give me error 3061 Too few parameters. Expected 1

    The SQL statement works in the query grid but not in the vba. I want a search box to pop up and I will enter the EquipID into the search box then it will load the correct records into a list box for that EquipID. See below for the SQL Statement. strSQL = "SELECT tblTag.TagNumber, tblTag.TagID...
  19. K

    userform editing & listbox issue

    i have a userform with -around 10-15 textbook to enter employee info -1 text box to search the employee info by enter their ID -1 listbox to show some of their info, not all I have some stuck with my code below like: when I search a employee, the listbox show all possibilities, by clicking the...
  20. J

    Creating mailmerge from excel using VBA

    Hi there, Please can someone help me? I have created (found on google) a code to create amailmerge from excel using a Macro. I am an absolute novice with VBA so pleasego slow! The code is: Dim Outlook As Object Dim Email As Object Dim ws As Worksheet Dim ws1 As Worksheet Dim address As...

Some videos you may like

This Week's Hot Topics

Top