Posts by Egad

    Hi scojax22 and welcome to the Ozgrid Forums.

    You can create a toggle button thru View-Toolbars-ControlToolbox then click on the design-mode icon, then the Toggle button icon and place & size the toggle button onto your sheet. Turn off design mode.

    Paste the code below into your worksheet's code module

    Private Sub ToggleButton1_Click()
    If ToggleButton1.Value = True Then
    'do this code
    'do this other code
    End If
    End Sub

    Let us know if you need clarification or help with the macro.

    Instead it just puts the same data in every cell despite the conditions of the formulas.

    Hi, can you please elaborate.

    As I understand it you have formulas in a spreadsheet referencing a blank area that is then populated via a Data Query?
    Your formula results do not update to reflect the imported data?

    If Workbook("Candidate Tracking").Saved = False Then
    Workbook("Candidate Tracking").Close SaveChanges:=False

    ....change Workbook to Workbooks

    If Workbooks("Candidate Tracking").Saved = False Then
    Workbooks("Candidate Tracking").Close SaveChanges:=False

    Not sure why you need an if statement though. If it isn't saved then close without saving. If it is saved then don't close?

    Workbooks("Candidate Tracking").Close SaveChanges:=False
    ....can stand on it's own.

    Dennis, you're still a genius in my books... if you can figure out this puzzle. :)

    Two hikers are walking in the woods. They find 2 dead men in a cabin. How did the men die?

    Will, that one needed a "C&C" warning in the subject line.

    (C&C = Cats & Coffee, get the cat off your lap and put the coffee down, so you don't laugh so hard you spill the hot coffee on the cat and then all hell breaks loose.).

    Mike, welcome to The Board.

    In the Visual Basic Editor click on your textbox then go to the TextBox properties, there is a property called PasswordChar, set this to *

    Let us know if you're not clear on how to do this.

    Perhaps because your file only contains 1 sheet "Report Lista Riferimenti" and your macro calls sheet "Report Lista Dettagli"?

    Sheets("Report Lista Dettagli").Select
    Selection.ColumnWidth = 5
    Columns("B:B").ColumnWidth = 5
    Columns("C:C").ColumnWidth = 11
    Columns("D:D").ColumnWidth = 22.57
    Columns("E:E").ColumnWidth = 17.57
    Columns("F:F").ColumnWidth = 21

    EDIT: I only see one sheet but file-property-contents shows 5 sheets, none called "Report Lista Dettagli".

    I have a similar date problem with cvs to excel imports. In my case I'm pulling retail unit numbers, no problem if the unit is 1,2 ,3 etc… but if the entry is units "4-5" I get 5/4/2003.
    My solution is to loop thru the column after import from the csv. ie:
    for x=1 to 1000
    if isdate(cells(x,10).value) then
    end if
    next x

    Perhaps your solution is also to loop thru the column after importing ie:
    if isdate(cells(x,1).value) then
    end if

    You would have to modify & test the above based on the specific conversion errors you are getting.

    JJacob, I think that data validation will work for you. You can customize the error messages and the error-messages will not appear when the spraedsheet is opened - only when a user changes specific cells.

    You would like an error message when a user leaves specific cells, but what if they never enter the cells? They could leave the cells as null and still close the file? Or are the cells pre-populated?

    The other approach would be to use VBA code. A Workbook_BeforeSave function could check for null cells before saving & give an error message.


    Originally posted by numcrun
    Great. I've just spent 10 months developing this application, which is business critical, and I find out crashes are unavoidable due to Excel being flaky under stress. I'm upgrading to Windows 2000 asap in the hopes that its superior memory management will help.

    I'll think twice before using Excel in a large project again.

    I wouldn't necessarily blame Excel. Any program will get 'flaky' when pushing memory limits.
    There may be a different programming approach that is more efficient and uses less memory but by the sounds of it you may pushing the limits on your 300MHz/128MB PC.
    I upgraded my 500Celeron from 128mb to 192mb and noticed an improvement in Excel but there are still many large workbooks that I can only run on better machines. I doubt that upgrading to Win2000 on your existing configuration would help.