Posts by Brand_New2VBA

    Hello VBA Gurus,


    So far I have gotten to the root cause of my problem thanks to the great mind on this wonderful forum now I would like to figure out which code will allow my userform to close out once the command button has been hit and task executed. to show my user form I have:


    Code
    userform1.show


    now how to I have it automatically close without having to hit the x at the top right corner?


    Your advise and wisdom would be most appreciated.

    Re: MACRO that allows user to copy and insert multiple worksheets through userform co


    Hi Sooper,


    The sheet ("CC Request Form") is hidden. Does that play a part in the error messages? Does it mater is the sheet being copied is hidden?


    this is what I have:


    I wish I knew why it works for you and not for me. I still get errors here:

    Code
    ActiveWorkbook.Sheets("CC Request Form 1").Copy _
    After:=ActiveWorkbook.Sheets("Sheet2")

    Re: MACRO that allows user to copy and insert multiple worksheets through userform co


    Thank you Sooper for your reply however that doesnt work either. I even attenpted to add an if statement within the code and that doesnt work this is what I have now:


    the error keeps coming up here:


    Code
    ActiveWorkbook.Sheets("CC Request Form").Copy _
               After:=ActiveWorkbook.Sheets("Sheet7")


    Do you have any other sugestions?

    Greetings all VBA Gurus,


    My UserForm has a ComboBox that allows users to select the number of forms they would like to add to the current work sheet. Once the numbers of forms are selected, through the ComboBox, I'd like the exact number listed in the ComboBox to be inserted after the third sheet in the workbook. However this code isn’t working and continues to give off errors. Can someone help be debug this problem? Where am I going wrong with this code? Is it possible to insert multiple sheets at a time? Microsoft certainly thinks so however the code continues to elude me.


    Your advice and opinions are greatly needed. Thanks in advance guys.


    So far this is what I have:



    Sincerely,
    Brand_New2VBA

    Greetings to all my excel gurus and VBA high masters;


    I would like to create a VBA code that responds to a command button. The code would basically create a brand new sheet identical to the original sheet prior to any alterations. So for example:


    If sheet one is a form that needs to be filled out--which starts off blank--once it has been completed the user can hit the "create new form" button (if he/she needs to complete another form) and a new sheet with a blank form and a "create new form" button will pop up.


    So far I'm hitting walls here and I'm not even sure where to begin.


    You're wisdom and advice would be greatly appreciated.


    Thank you Gurus & VBA masters


    Sincerely,
    Brand_New2VBA

    Re: Sorting by date formula with both numerical values and text values


    Hi Glenn,

    I've sent you an email with the password.

    The sorting will be for all the months within the year. I just used May as an example. Currently the sorting works when the date is added numerically (e.g. 5/1/2011) but I want, when there is no exact date, to be able to put the words "Early May", Late May or "Mid May" and have that be sorted alphabetically all at the same time the other dats are being sorted numerically. That is why there is a type mismatch--becasue I havent got the right code to tell excel to sort the text dates while sorting the numeric dates.

    Re: Sorting by date formula with both numerical values and text values


    Hi,

    Thank you so much for replying to my inquiry. I have attached a sample of my work below. I would like it to be sorted numerically first. e.g.:
    5/1/2011
    5/5/2011
    5/6/2011
    Early May
    Late May
    Mid May

    Please see the attached file (below) named "Sample". Hopefully this will make things a bit clearer. I hope you can help me with this.

    forum.ozgrid.com/index.php?attachment/38948/

    Hi All,

    I've come across a road block. The sorting code I have works well only with numerical figures (5/1/2011). How can I make it work with both text ( Early May) and numerical (5/1/2001)figures? for example, here what I have so far:



    Now I need to also tell excel to sort if the dates entered happen to be, for example, Early May, Mid May or Late May. How can I get the formula to tell excel that if a numerical date is entered the the specified cells ( 5/23/2011) sort date, however if only text is entered (Late May) sort alphabetically by that entry as well.
    Can this be done? If so, how? Can you please help me with this? Thank you!

    Re: Date recognition using IF formula


    Hi Barb,

    Thanks for the advice. I tried your codes and it didnt pan out very well for me (kept getting a "type mismatch error"). I also tried this and it doesnt work either:



    this doesnt send only may dates to the may column ("C") it also send every other dat there too.

    How to I isolate the dates?

    Hi,

    I keep hitting my head against the wall with this formula. I would the data being copied to paste in a certain column only if the information in the range containes the month May in it. I tried Dim May as date but it didnt work then I tried an IF formula telling excel to pick up the word May and I keep getting the error message type mismatch. This is what I have so far and I'm not getting anywhere with it.



    Can anyone help me complete this code? Am i way off or am I close?

    Re: Execute code based on specific text in target range of cells


    The code I have now executes the task its told--which is to copy and past information to column C. I'd like to completely remove that feature. Rather than tell it a specific column to copy and paste to I want the information to be pasted under whatever month is indicated in the "intended Publication date" in the appropriate column and spaces allocated for that particular data--please use spreadsheet attached for refeence (Sheet1 "Future workflow").

    Re: Execute code based on specific text in target range of cells


    Thanks so much for your help so far. Ed. You've been a very good teacher in helping me understand the methodology behind VBA coding.

    Alright, I've gotten a bit further with this formula, now all I need to do is have the information being copied from "Sheet 3" to be pasted according to the Date range on Sheet 1. For instance:

    information in a quese has teh following data
    John Black
    Doctor
    May 23

    I would like this information to be copied and pasted under the column designated for May dates under the last set of data without me having to indicate the specifice range. Is this possible? Please see the spreadsheet attached above (in the earlier posts) for examples.

    Re: Execute code based on specific text in target range of cells


    Hi Ed,

    Hope your weekend went well. Thanks for the advise. I tried you way, however I keep getting an error. This is what I'm using:



    Where did I go wrong?