+ Reply to Thread
Results 1 to 10 of 10

vba to create proposals

  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Question vba to create proposals

    Good Morning and thanks for reading. This forum has been a tremendous help, when "the google" hasn't. I am new to VBA and self taught with youtube and these forums, so I apologize if my code is sloppy or poorly written. With that being said, I have a workbook that has our bid sheet. I am trying to create the proposal from the bid sheet using VBA. I have it now so that it's almost workable, but have a few questions.

    1. How do I format this code, shP.Cells(k, 4).Value = "Approx. " & shB.Cells(j, 3) & " " & shB.Cells(j, 4) & " @ $" & Round(shB.Cells(j, 11), 2) & " / " & shB.Cells(j, 4)
    to show "Approx. 150 SF @ $500.00/SF" instead of showing "Approx 150 SF @ $500/ SF" *I NEED TO HAVE THE TWO DECIMAL POINTS*

    2. I need to have the "Title Block" which is the 1st 7 rows of the proposal to be on every page that is needed. I have already set up the header to show info, and maybe I could use that, but the formatting in the headers was poor, if I remember correctly.

    3. I'd like to have automatic page breaks when the Disclaimer section goes to a 2nd, or even 3rd page. How can I put the disclaimer section on the last page, and be on the bottom of the page?

    Thanks again in advance

    attached is part of the workbook, I tried to put the code in, but it's telling me its too long
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: vba to create proposals

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: vba to create proposals

    anyone? I got an answer for question No. 1, anyone help on the last two? Thanks in advance

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,375

    Re: vba to create proposals

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: vba to create proposals

    I have also posted this question at Mrexcel https://www.mrexcel.com/board/thread...eet-s.1158574/ I am sorry I didn't read the rules about crossposting and hope someone may be able to help me get started on my inquiry. My apologies
    Last edited by mdolinger; 01-18-2021 at 09:54 AM.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: vba to create proposals

    Q1
    shP.Cells(k, 4).Value = "Approx. " & shB.Cells(j, 3) & " " & shB.Cells(j, 4) & " @ $" & Round(shB.Cells(j, 11), 2) & " / " & shB.Cells(j, 4)
    Change as
    shP.Cells(k, 4).Value = "Approx. " & shB.Cells(j, 3) & " " & shB.Cells(j, 4) & " @ $" & Format(shB.Cells(j, 11), "0.00") & " / " & shB.Cells(j, 4)

    Q2
    Header (1 to 7) rows is ok.
    It is not clear what is actually required.

    Q3
    If page break is required 3 rows after text "NOTES:"

    Dim Frng as range
    Set Frng = Cells.Find(What:="NOTES:")
    If Not Frng Is Nothing Then ActiveSheet.HPageBreaks.Add Before:=Frng.Offset(3, 0)
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  7. #7
    Forum Contributor
    Join Date
    07-08-2008
    Location
    New York City
    MS-Off Ver
    2013-2016
    Posts
    157

    Re: vba to create proposals

    Hi mdolinger,

    Regarding your second question, You don't need code for it. Go to Page Setup/Sheet Tab/Rows to repeat at top. Select rows 1-7 and that's it.

  8. #8
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: vba to create proposals

    thank you both for responding. @DMA thank you for that, I didn't know that existed. @kvsrinivasamurthy to answer your question, I am creating a proposal to use, but the items will vary. Sometimes we will have only one item, so only one page is necessary to get all the information. When we have bids that have say, 20 items, we will need 2-3 pages for the proposal, so on each page, I would like to have the first 7 lines be the same on each page for multipage proposals. It looks like I can take DMA's solution and record it in the vba recorder. As far as question #3, I tried your solution, but it's not performing as expected. I would like the disclaimer to be on the bottom of whichever page is the last page, but I am not sure how to accomplish that. So for instance, if we have 8 bid items, I would want the disclaimer to be on the bottom of page 2, but if we only have 1 bid item, It would be on the bottom of page 1. I guess I need to see how many bid items, make it go to the next page, and use? I am not sure how to do that, but would love some direction. Thanks again for the help.

  9. #9
    Forum Contributor
    Join Date
    07-08-2008
    Location
    New York City
    MS-Off Ver
    2013-2016
    Posts
    157

    Re: vba to create proposals

    This will give you the last printed page: ActiveSheet.PageSetup.Pages.Count

    Combine it with the code given by @kvsrinivasamurthy

  10. #10
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: vba to create proposals

    @DMA thank you again. I will give it a go in the morning, and let you know what I get. Thank you again for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 10-01-2020, 06:13 AM
  2. Replies: 7
    Last Post: 03-28-2019, 05:19 PM
  3. Price lists and proposals
    By Albarob in forum Outlook Formatting & Functions
    Replies: 2
    Last Post: 01-19-2017, 04:23 PM
  4. Macro to find a word in a cell, create a transparent text zone over it, create a hyperlink
    By martin brandl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2015, 03:24 PM
  5. [SOLVED] Help me fix attached code (create Outlook email then create calendar item)
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2013, 08:15 PM
  6. Vba cmd1 create workbook cmd2 create worksheet depend upon combobox values
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2013, 03:20 AM
  7. Replies: 3
    Last Post: 11-12-2012, 10:33 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1