chr10

  1. P

    Email BODY error lines all in red

    Hi Please can you help on the code below, this is in my command button but the email body is all in red, please can you help? Private Sub CommandButton3_Click() Dim aOutlook As Object Dim aEmail As Object Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String Set aOutlook =...
  2. H

    Put result of ActiveWorkbook.Queries in Array instead of in a Worksheet

    I have a query: Bron = Excel.CurrentWorkbook(){[Name=""Finost_OI_1""]}[Content]," & Chr(13) & "" & Chr(10) & _ " #""Type gewijzigd"" = Table.TransformColumnTypes(Bron,{{""Date"", type date}, {""ArtNr"", type text}})," & Chr(13) & "" & Chr(10) & _ " #""Rijen gefilterd"" =...
  3. H

    Put result of ActiveWorkbook.Queries in Array instead of in a Worksheet

    I made a Querie: ActiveWorkbook.Queries.Add Name:="QueryTab", Formula:="let" & Chr(13) & "" & Chr(10) & _" Bron = Excel.CurrentWorkbook(){[Name=""Finost_OI_1""]}[Content]," & Chr(13) & "" & Chr(10) & _" #""Type gewijzigd"" = Table.TransformColumnTypes(Bron,{{""Date"", type date}...
  4. M

    a MACRO to populate headers on worksheets??? Code listed

    I have a workbook, which I want to create a macro button to populate headers on certain worksheets in the workbook. I have a macro button created in another workbook which works perfect. I figured I could copy and paste the code of the macro into this new workbook and edit it as I see fit...
  5. A

    Importing .csv with VBA

    I wrote some VBA to that adds a .csv file as a power query in Excel. The file location can change. I have some code that allows you to pick where the files are located, but I can't figure how to use that input to tell it where to look. Below is what I have for getting the file location...
  6. P

    adding data from combobox if checkbox is clicked on into email

    Hi goodafternoon, I have thecode below where I am trying to add another line after the Comments which iswith a checkbox. I want to add ‘ Job Type’ as a heading and the ComboBox6 Data if the Checkbox1 isclicked, can you help please? [HTML] Private SubCommandButton2_Click() If...
  7. krishna334

    ActiveCell.Formula modification

    Hi Experts, In one of the cells i have the below formula : ActiveCell.Formula = _ "=""Hi," & Chr(10) & "" & Chr(10) & "Good Day!" & "Please confirm the PO# "" & A2" What i need is, the last A2 in the formula is not constant i want to use somethig like A & i where "i" will vary. So...
  8. E

    Scraping the web for data with a dynamic URL dependent of if/elseif statements

    Hello, I am trying to scrape some stock data from yahoo finance with a dynamic URL, I am using if/elseif statements based on the exchange because I am pulling data from stocks listed on different exchanges so based on that the URL changes. I am using if/elseif commands to create the conditions...
  9. E

    Coding error with splash screen on open

    Hi all, I am using this code to open a workbook with a splash screen as follows. Unfortunately when I enter it and try to exit, I get an error which states: "Compile error: Ambiguous name detected: Workbook_BeforeClose" What should i do to correct it? Private Sub Workbook_Open() MSG1 =...
  10. D

    Importing newest *.csv file into excel

    Good afternoon, I have this code from a recorded macro, that imports the specific file into the open worksheet. (highlighted path and file) Sub importnewfile() ActiveWorkbook.Queries.Add Name:="Derby_Station", _ Formula:= _ "let" & Chr(13) & "" & Chr(10) & " Source =...
  11. D

    Need help cleaning up this ugly if/elseif block.

    Hello friends, I spent a while searching and googling a solution with no resolution. Tried creating an array, but my array skills are lack luster. Basically, I'd like a suggestion of an easier/cleaner block of code to accomplish the same thing. This code functions properly but seems very...
  12. R

    Starting to hate Excel - Making -any- change to the VBA breaks this, for some reason

    Have the following code in a module: AdSelect.LDAlts = "---A---" & Chr(10) & Cells(ActiveCell.Row, "F").Value & Chr(10) & Chr(10) & "---B---" & Chr(10) & Cells(ActiveCell.Row, "G").Value & Chr(10) & Chr(10) & "---C---" & Chr(10) & Cells(ActiveCell.Row, "H").Value If I open the workbook and...
  13. V

    #1004 Application-Defined Error

    Hi, I am facing #1004 Application-Defined Error issue when try to apply below formula with VBA. The actual formula is : =IFERROR( IF(INDEX('Source data'!$D$4:$ES$40003,MATCH($G5,'Source data'!$EF$4:$EF$40003,0),MATCH(H$3,'Source data'!$D$4:$ES$4,0))="N", INDEX('Source...
  14. B

    VBA File Directory Issue

    I need some help I am not sure why how to get this code to run I have tried a few different things, but I just want to be able to easily change the file directory via DIM Directory = "C:\DATA" FileName = "PRNT" & i & ".DAT" DirFile = Directory & FileName ActiveWorkbook.Queries.Add Name:="PRNT"...
  15. H

    Message Box to display current date

    I have the following code ShowDateBox: IPrompt = "PLEASE ENTER DATE FOR THIS REPORT:" _ & Chr(13) & Chr(10) & Chr(13) & Chr(10) _ & "(Normally Accounting MONTH END date)" IDeflt = Format(Range(InsImpDate).Value, "dd/mm/yy") ' Define buttons...
  16. P

    Help with vbYes

    Sub isAnyWorkbookOpen() Dim wb As Workbook Dim wbs As Workbooks Dim msg As String Dim answer As String Set wbs = Application.Workbooks msg = "The following worksbooks must be closed before continuing." & Chr(10) & "Do you want to save and close these...
  17. P

    Close all the other workbooks except current workbook based on a vbYes and vbNo answer

    Sub isAnyWorkbookOpen() Dim wb As Workbook Dim wbs As Workbooks Dim msg As String Dim Result msg = "The following workbook(s) must be closed before continuing:" & Chr(10) & "Do you want to close?" & Chr(10) & Chr(10) Set wbs = Application.Workbooks...
  18. P

    how to add bold to a section in my email vba code

    Hi good morning all, Please can help with the code below, the section half way down where it says Comments: I want this to be in bold, I have tried <b> but this didn't work, please can you help me? Private Sub CommandButton2_Click() If TextBox9.Value = "" Then MsgBox "Please enter...
  19. V

    delete comment if present in VBA

    Hi Team, I have a macro that works fine that adds a comment to the cells but if there is one there already it will stop. What I was hoping to do was rather that delete the comment, could I append another comment to it rather than delete and lose the previous one? Code as below for the part...
  20. S

    Trying to make a macro more efficient

    Hi All ! I have a piece of code written from the macro recorder which serves its purpose but runs quite slow as the data set increases, my VBA skills are limited so I'm wondering if or how the code below could be written to make the process more efficient ? Basically what it will do is copy a...

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