>

User Login

TipidPC.com is the largest online IT Community in the Philippines. Have something to sell or share? Sign up for an account now. It's absolutely free!

Forum Topic

excel macro programming

  • thanks Sir Ram, noted yan :)
  • johnToT on September 30, 2014 11:51 PM

    Macro recording is cool. Here is a sample. It uses the font property such as name, size and others - truly an object oriented approach.
    Sub ChangeFontType()
    '
    ' ChangeFontType Macro
    '

    '
    Range("A1").Select
    With Selection.Font
    .Name = "Candara"
    .Size = 10
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ThemeColor = xlThemeColorLight1
    .TintAndShade = 0
    .ThemeFont = xlThemeFontNone
    End With
    End Sub
  • indeed, dyan lang din ako kumukuha ng idea sa paggawa ng simple macro.

    HTML body in may email macro proble is i dont know the code that will call the value in cell, instead I used below code problem is not sure how can i incorporate the codes in changing the font size, color etc. by default its times new roman '12. No issue naman as long as gumagana xa :) nice to have lang ung makapagpalit ng font type size color.

    StrBody = "Hi " & cell.Offset(0, 5).Value & "<br><br>" & _
    Sheets("Email").Range("L4").Value & "<br><br>" & _
    Sheets("Email").Range("L6").Value & "<br><br>" & _
    Sheets("Email").Range("L8").Value & "<br><br><br>" & _
    Sheets("Email").Range("L11").Value & "<br>" & _
    Sheets("Email").Range("L12").Value & "<br><br><br><br><br>" & _
    Sheets("Email").Range("L16").Value & "<br><br><br><br>" & _
    Sheets("Email").Range("L27").Value & "<br>" & _
    Sheets("Email").Range("L28").Value & "<br>"
  • johnToT Send Message View User Items on October 01, 2014 09:48 PM

    I think you like to see on your email body a formatted message using excel macro, and not formatted value in a cell.
    All right here is an example, I use ms outlook 2007.
    ' Compose a message
    Strbody = "Hi " & Range("A1").Offset(0, 3).Value & "<br>" & _
    Sheets("sheet1").Range("E1").Value & "<br><br>"

    ' Format font
    StrbodyFormated = "<font face='calibri' size='3.0' color='green'>" & Strbody & "</font>"

    With OutMail
    .to = Range("A1").Value ' Cell A1 as reference cell used for offsets
    .Subject = Range("A1").Offset(0, 2).Value
    .cc = Range("A1").Offset(0, 1).Value
    .HTMLBody = StrbodyFormated
    .Display
    End With

    On your excel sheet at sheet1, row 1, from column A to E
    sendto-tpc@yahoo.com | sendcopy-me@gmail.com | My subject line | Here is my message!! | I am at E1

    Sample output message in green color.
    Hi Here is my message!!
    I am at E1

    Note: I am recalling my little knowledge in html and forced to setup my gmail account in ms outlook 2007 :))

    -- edited by ram2010 on Oct 02 2014, 07:01 AM
  • @ Ram

    Yes it should be a formatted message using excel macro. even if you format the text in cell such as color size etc it is useless since excel macro send it by default (im using ms outlook 2010) since i don't know how can i format the text via vb code - i also tried macro recording to get the code but still no success :'(

    surprisingly my background pala kayo sa html hehehe galing!

    Thanks again sir Ram, ill try it then :) so sana mapagana ko hehe.
  • Good day sir pa help po sa excel im trying to look for this formula i can't actually find it on google.

    I need a formula that works like a search toolbar, where in i would type a certain text on a particular cell and all entries with that "certain text" will be filtered/ will be displayed.

    Thanks sirs!
  • mikedc1204 on October 14, 2014 08:18 AM

    1. Open your workbook
    2. Press control+F
    3. Click options
    4. In the "within: textbox, select workbook. This is sheet by default.
    5. Under find what: type any text you want to search
    6. Press find all

    Excel will give you every cell in every sheets that it finds the text that you want to search, and will be
    presented to you in an extension window, where you will just have to click the cell links and that cell will be
    selected by excel for your further inspection.

    Of course I can make a macro with this. But I think this excel tool is already sufficient.
    If you want to process the text that you find for another tasks, then probably a macro is better.

Who's Online

803 active users within the last minute, 434 members, 369 guests.
Our newest member is gracelev474
Click here to see online members.

Browse Items

More »

Search TipidPC


New Want to Buys

Active Items for Sale

Active Want to Buys