Search results

  1. S

    VBA code won't delete sheet

    perfect of course its the "are you sure you want to delete" message that was stopping me, why didn't I think of that. Thanks dbDamo
  2. S

    VBA code won't delete sheet

    I have some code to open an excel workbook in the background, run the macro in that workbook, delete a worksheet, then save as. It all works perfect apart from the delete worksheet part. Can anyone help? This is my code: Public Sub RunExcelMacroOrSub() 'declare variables Dim xlApp As...
  3. S

    Delete Macro from Excel Workbook

    Hi I have some vba in access that exports data to an excel workbook, runs the macro in that workbook, then does a save as. Thing is it also saves the macro when it does the save as. Is there a way I can delete the macro after the save as? Hope that makes sense. Many Thanks Simon
  4. S

    Conditional Formatting in VBA

    I have this code which isn't working. Could someone give me some pointers? .Application.Cells.Select .Application.Selection.FormatConditions.Delete .Application.Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, Formula1:="549"...
  5. S

    formatting an excel document in access

    I have read up and found that you can format an excel document from access. I have not seen though if it is possible to get access to add in comment boxes into certain cells in excel, is this possible? Thanks
  6. S

    send excel file via access

    Hi guys I am trying to send an excel file via access, is this possible. I'll explain in full what I am doing. I am running a query in access. Exporting it to excel. Access then formats it, bolds the headers, etc. I then want Access to e-mail this now formated spreadsheet. Is this possible...
  7. S

    Could not update; Currently locked

    Also, another thought sorry. I had it set to Compact on Close. Could it be that someone is closing the database, its trying to compact which is causing issues for the others?
  8. S

    Could not update; Currently locked

    I am wondering as it only seems to happen on one particular form when its opened, Could it be that I have code in the On Load area and in the On Activate area. And that they are trying to do their bits at the same time. In the On Activate Area i have DoCmd.Maximize
  9. S

    Could not update; Currently locked

    Each user has access to the main database, the database isn't split. I have just made it so they have access only to certain forms
  10. S

    Could not update; Currently locked

    I have a database which 8-10 users have access to, I have made it so they only have access to certain forms. I am the only only to have access to the background information. Just recently every now and then they start to get a message which says "Could not update; Currently locked" I have had...
  11. S

    Formatting Excel document from Access

    !!!!UPDATE!!!! I have worked it out. Basically I was exporting a query to excel then formating it once exported. I was calling the File "Initial Distributions" but I noticed that Access had replaced the Space with an _. Thanks though for your help
  12. S

    Formatting Excel document from Access

    Hi DCrake I rebooted my computer to close the Excel document as it wasn't appearing in the Task Manager, and then retried the code without the end if. Thats when I get the "9 - Subscript out of range" message.
  13. S

    Formatting Excel document from Access

    Thats the code. I have assigned this to the On Click of a button using Call ModifyExportedExcelFileFormats(X:/myfile.xls) It starts to look like its working then I get the 9 - Subscript out of range message. I then can't go into the excel file as its sayign I am already in it.
  14. S

    Formatting Excel document from Access

    Further to this if I take the End If out I get error message 9 - Subscript out of range The workbook then stays open in the background and I am unable to go into the excel document to edit it as its saying I am already in the workbook
  15. S

    Formatting Excel document from Access

    Hi I have copied and pasted the code from the below link. http://www.access-programmers.co.uk/forums/showthread.php?t=84119 But I am getting an error message saying End If with no block If. Can anyone helpw me adapt it to work. Thanks
  16. S

    iif statement as a criteria

    I have managed to find a work around which wors really well, I am using an iif statement in a form and then getting my query to use the result in the form. Basically in my query I am saying this as the criteria. Between 1 and [Forms]![Frm_Player Entry]![Count Players]
  17. S

    iif statement as a criteria

    Hi David Lets see if I can explain this. Basically I am setting up a database to run a tournament. What I want to tell it to do is if the amount of entrants we get is, lets say 14, then insert 2 Byes to make it up to 16. I have a list of Byes in a table labelled 1 to 8. So my query relates...
  18. S

    iif statement as a criteria

    I am trying to use an iif statement in a criteria of a query. Basically I want to tell it that if the count of fields in a certain table is equal to a certain number then the criteria should be between 1 and 3 if not then the criteria should be between 1 and 4 is this possible?
  19. S

    Count in VBA

    Perfect DCOUNT function does the trick Thanks
  20. S

    Count in VBA

    I have a button on a form. What I want to tell the button to do is count the number of entries in a table, if that count is equal to a certain number then run a macro, if the count is not equal then run a different macro. How do I use the count function in VBA?
Back
Top Bottom