vbcr

  1. D

    VBA search for characters+hard return

    Hello all! I have a series of cells I need to work on and separate the contents based on criteria. The common characteristic marking the point where I need to separate text is two commas followed by a hard return. How can I format the search criteria so it looks for ",," plus the hard return...
  2. J

    Create email with same body but different addresses (using drop down menu)

    So I've got a drop down menu which creates an email. Body of the email is always the same but the addresses and subject change depending on the option chosen from the drop down list. It pulls the email addresses from a table and also inserts the contents of the clipboard to the body of the...
  3. H

    Outlook - UserForm open in center of New Email Window

    I added a button to the ribbon of a New Email Window that when clicked opens up a UserForm. I would like for that UserForm to open up on the center of that New Email Window. Below is the code that I have so far. Sub Add_Client_ID() Dim wdDoc As Object Dim oRng As Object Dim oBM As Object Dim...
  4. S

    VBA - creating folders to be automated

    Hi All, I have the following code.. Dim lngCount As Long, Msg As String lngCount = 2 If Len(Dir(Cells(1, 20), vbDirectory)) = 0 Then MkDir Cells(1, 20) Else Do Until Len(Dir(Cells(1, 20) & " - " & lngCount, vbDirectory)) = 0 lngCount = lngCount + 1 Loop MkDir Cells(1...
  5. G

    Using VBA to open an Outlook window and put hyperlinks in the Body.

    Two questions for this one. First question: I have this code that I’ve been messing with. I have it displaying my message the way that I want, but I would like two parts of it to be Hyperlinks. Sub Workbook_AfterSave(ByVal Success As Boolean) If Success Then Dim OutApp As...
  6. UMAKEMESIK

    Help with VBA Hyperlink issues

    We have some code that formats an outgoing email and it works great. With Sheets(1) strBody = "<I><font size = 6><FONT COLOR = RED>This order is now directed to Scheduling</font color><BR>Please evaluate Order Entry Log for Status" & "</FONT>" & "</I>" & "<p>" & vbCr & _...
  7. K

    Application.InputBox - "Cancel" button

    I am having trouble coding a macro in the case where the response to an InputBox request is the "Cancel" button. As I understand it, the cancel button returns the value "False". The following code results in "Type Mismatch" error 13 at the "If Q = False" line. Q has been defined as a variant. In...
  8. K

    VBA Code Run Time Error on Excel to Powerpoint

    Okay. i have been using the attached code for some time without issues in my files. However, within the past few days, I have been getting a run time error that is very random in its appearance. The code below is simplified to create two slides in PowerPoint, where one Excel table becomes one...
  9. A

    VBA Code / File not found error

    Hello. I have a VBA that is pulling files out of excel and creating emails. I have an extensive master list with potential files, which may or may not be found on a given week. My issue is, when it runs, if it cannot find one of the files, then the module stops. Is there a way that if a file...
  10. P

    Unable to execute VBA (interacts with Outlook) in Windows 10

    Hi, I have recently upgraded my system version from Windows 7 to Windows 10. My Microsoft Excel version also got upgraded from 2007 to 2016. However, I am unable to run the below VBA (in Windows 10) and is stuck in the step - highlighted in red...
  11. K

    Code to create message/input box, for save via VBA to powerpoint

    Hello, I am stumped on an issue an amateur of hack at VBA. I have tried to find a solution on-line but have failed in every attempt. So I defer to the knowledge of this group to possibly help me. I am trying to create a message box to prompts users to save an extracted PowerPoint file, using a...
  12. M

    Add copy charts and shapes with the present script for copy tabs of workbook to new workbook

    Hi I am using the below script for copying specific worksheets from a workbook. I want to add for copy multiple Charts and Shapes as picture. Charts as Chart No. 71, 24 & 35 and Shape as Rectangle 53, 54 & 54. Option ExplicitSub RunMacro1_Click() Application.Calculation = xlCalculationManual...
  13. J

    Read and Write Column Width Function

    Since I constantly find myself tweaking column widths after running routines, I thought I would just write code that writes column code. Basically if a sheet is the way you want it, you determine the header row (just for commenting purposes) and run this to build code that figures out all your...
  14. azizrasul

    WordApp.Run

    I have inherited some code that I am trying to get to work. There's a lot of code so will give what I think is relevant. I get the error because the pdf file isn't there!! Sub SavePDF() Ben_Table_Filename = sPDFDir & sCompanyName & " - " & sQuoteName & " - " & dYearNow & "." & dMonthNow & "."...
  15. D

    Opening multiple workbook via a master workbook

    Hi All, I don't know what I am doing wrong I have a master workbook that opens a new template file (workbook 1) and a data file (workbook 2). The code below works in certain cases but not all. Both workbooks closed prior to executing the vba - PASS Both workbooks open prior to executing the...
  16. S

    Header Footer Editor VBA

    I'm having issue with a macro that I never used to have issues with. The code goes through the Header/Footer of each worksheet within the workbook and updates it with three lines in the Left Header: Company Name Program Effective Date It also adds in a logo that we use in the right footer and...
  17. M

    VBA to Copy two worksheets to New Workbook

    Hi, I am using the below script for copy two worksheet to a new workbook but i do have two issue with this: With the available script: 1) As my original worksheet alternate rows are filled with specific color, which is getting change after copying the data to new worksheet. 2) When the pop up...
  18. D

    Adding a range to body of email

    Hi, I have this VBA that works great. It convert a specific range in active worksheet and attaches as PDF to email. Now I'm trying to also add the same range to the body of the email. Any advise? Sub SendPDF() ' Create PDF and send as attachment. Dim strPath As String, strFName As...
  19. W

    Repeat VBA Code on Multiple Worksheets

    I have the following VBA code and want to repeat it across multiple worksheets on a workbook. --------------------------------------------------------------------- Option Explicit Private Enum Nwc ' Worksheet columns ' 17 January 2018 ' assign any...
  20. J

    Insert Macro Excel Table From A1:B14 Into Outlook

    Dear Mr Excel, I have created below macro, but I don't know how to insert (macro) excel table from A1:B14 into outlook. Sub SendEmailBody() ' ' SendEmail Macro ' ' Dim olApp As Outlook.Application Dim olMail As Outlook.MailItem Set olApp = New Outlook.Application Set olMail =...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top