Posts by ginobuonpanino

    Hi, I want to use select case with a named range. the code I'm using is:

    Now nothing happened, I prefer to not use the if form as usual. The ranges are composed of cells every three rows and every 7 columns, like A1 A8 A4 A8...

    thanks for you help! :)

    First file BOOKING

    I select the seats I want to book using the checkboxes, then, I write the name inside the textbox and I press book.
    The program loop throught the line in names sheets and if there is a true value it write the booking's name in the next cell. This file is very slow in old PCs.

    Secondo file testtest

    Here I select the seats I want so book by double click. the value of the seats turn from false to true. Then i write the name od the person ho wantis to book and I select the yellow cell to book. To write the reservation It use the same loop of the old file.

    Hi, I'm trying to improve the performance of a spreadsheet I've made that has to work in old pcs. The use of this spreadsheet is as a tables reservation. You can check the seat you want to reservate and then he write the name in the list. The spreadsheet works great but I'm trying to rewrite the code to avoid the use of objects (I think that this is one of the things that slow down my macros). Now I have 3 questions.

    1. Is it true that a lot of object could slow down my excel file (I have more or less 300 checkboxes, and a couple of buttons)?
    2. If I use the event macros (BeforeRightClick, BeforedoubleClick and SelectionChange), instead of objects, could I improve the performance of this file in old pcs?
    3. Once I select the seats in sheet1, I linked the cell from this sheet to sheet2 to give true or false value based on the seat selected (If selected true, empty false). I create a macro using the for function (from bigining of the column to last value), that with a if funcion find the true values and write the name in a cell in sheet1 to the next cell in sheet2. Is there a better way to do this? Avoiding the use of loops? Maybe with a vlook?

    Thanks for you reply!

    Re: Add new button in row of an excel table and assign a macro

    Thanks for the help cytop... I've tryed and it works, but not as I wish. The button don't fit completely the cell (it's a little on the left) and moreover it's not always visible. I'm not an expert one in vba, but there is not a way to just use the .offset (rowcount, 18) to put the button in this cell (everytime I add a new row to the excel table? Or to make it always visible?

    Hi, I have an excel table with 16 columns. I want to add another one and in the 17th I want to put a button named "edit" and assign to it the macro "macro1". To write in the excel table I use this code:

    So every time I write a new row to the excel table I add even a button. Is there a way?


    Re: Age in Userform automatic update

    It works, but not as in your example. When I add something new it creates a new row with all the data, but, it also add another row with just the formulas in the last 2 cells. So it add 2 rows everytime.

    Hi, I have a table with different entries, I fill this table using a Userform, so I don't have a fixed number of rows; at the end of the table I put 2 columns:

    the first calculate the age based to the date of birth (FORMULA =DATEDIF(K2;TODAY();"Y") )

    the seconf column say if the guy is adult or not (FORMULA =IF(P2>=16;"adult";"young") )

    I extend the formula to the whole column, but...

    the first of this 2 columns is filled with 115 and the second with adult. Because I need to say how many adult and young there is in my table (and at the moment I have every cell with adult I'm trying to extend this formulas only after I fill a new row.

    I have an idea, if I add to my code to write the formulas in the cell? Or if you have any ideas they are welkome

    Thanks for your help

    Re: Copy range to particular cell repetitively

    mmm... interesting... I think that the best way to save paper is to use just a single page with just a single ticket... I can find smaller paper size to fit the output layout. So the macro must populate the first ticket, print, clean the cells and loop... or create empty tickets and then print many times as are the rows with contents in sheet1. I attach a sample file...

    Re: Copy range to particular cell repetitively

    I'm sorry, I'm working with D4n13l, but now he is on holiday, thats why I'm posting. The workbook I attached is right. I don't put the code, because, I made some changes, because D4n13l used merged cell that caused some error so I simplified the layout to avoid those merged cells.

    Re: Activate active x textform pressing enter

    My idea was to write what I want to put in sheet1 (in activated cells) and without pressing the button to activate the macro activate the macro by just pressing enter. So I don't need to use the mouse, I only have to write the name and push enter.

    Hi, I create this simple code. I have a column in Sheet1 filled with bolean operator (true/false, activated by checkboxes). The code below search for true value and if the next cell is empty it fills it with the content
    written in the active x textbox I put in Sheet2 (where there are the checkboxes) and finally it cleans the text form. In sheet2 I even put a button to which I assigned this macro (that I write in Sheet1 objects). My question is, there is a way to activate the textbox by pressing enter (Key 13 if I'm not mistaken).

    Thanks for any help! :)