Search results

  1. W

    Error 424 when opening .xlsx from Access 2010

    Unfortunately not, if only it was so simple.
  2. W

    Error 424 when opening .xlsx from Access 2010

    Produces the same 1004 windowstate error and highlights .Parent.WindowState = xlMaximized Note that the spreadsheet opens maximised with or without the .Parent but this dialog box is behind it.
  3. W

    Error 424 when opening .xlsx from Access 2010

    Hi Winshent, I agree that it looks like it could be a setup/config issue rather than a coding issue, I'll just have to keep looking. As an aside, when I add in the Excel lib reference the spreadsheet will only open minimised regardless of code used. thanks for your help.
  4. W

    Error 424 when opening .xlsx from Access 2010

    Tried that but then the spreadsheet just opens minimised, which is back where we started....
  5. W

    Error 424 when opening .xlsx from Access 2010

    If I comment out Dim xlBook As Object I still get the 1004 WindowState error which highlights this line .WindowState = xlMaximized
  6. W

    Error 424 when opening .xlsx from Access 2010

    Apologies, the error I get when running Private Sub txtWorksPriceLink_Click() Dim xlApp As Object Dim xlBook As Object Set xlApp = CreateObject("Excel.Application") With xlApp Set xlBook = .Workbooks.Open("Z:\" & Me.txtProjID & "\WorksPrice.xlsx")...
  7. W

    Error 424 when opening .xlsx from Access 2010

    Hi, I've tried your code but get this error when it runs: Compile Error: User -defined type not defined And stops at this line: Dim xlBook As Excel.Workbook I've googled this error which suggested missing references, I've added DAO lib, ActiveX lib and Excel lib but it didn't...
  8. W

    Error 424 when opening .xlsx from Access 2010

    Ok, I run this code: Private Sub txtWorksPriceLink_Click() Dim xlApp As Object Dim wb As Object Set xlApp = CreateObject("Excel.Application") Set wb = xlApp.Workbooks.Open("Z:\" & Me.txtProjID & "\WorksPrice.xlsx") xlApp.Visible = True xlApp.Windowstate = xlMaximized Set wb = Nothing Set...
  9. W

    Error 424 when opening .xlsx from Access 2010

    Here it is with WindowState Private Sub txtWorksPriceLink_Click() Dim xlApp As Object Dim xlBook As Object Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("Z:\" & Me.txtProjID & "\WorksPrice.xlsx") xlApp.Visible = True xlApp.Windowstate = xlMaximized Set...
  10. W

    Error 424 when opening .xlsx from Access 2010

    Here's the code Private Sub txtWorksPriceLink_Click() Dim xlApp As Object Dim xlBook As Object Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("Z:\" & Me.txtProjID & "\WorksPrice.xlsx") xlApp.Visible = True xlApp.Windowstate = xlMaximized Set xlApp = Nothing...
  11. W

    Error 424 when opening .xlsx from Access 2010

    This is the code Private Sub txtWorksPriceLink_Click() Dim xlApp As Object Dim xlBook As Object Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("Z:\" & Me.txtProjID & "\WorksPrice.xlsx") xlApp.Visible = True Set xlApp.UserControl = True Set xlApp = Nothing...
  12. W

    Error 424 when opening .xlsx from Access 2010

    Apologies, full error should read: Unable to Set the Windowstate property of the Application Class
  13. W

    Error 424 when opening .xlsx from Access 2010

    Yes, same problem.
  14. W

    Error 424 when opening .xlsx from Access 2010

    Thanks for your help guys but still no joy, when I try xlApp.WindowState = xlMaximized Excel opens but with the following error: Runtime error 1004 - Unable to windowstate property of the Application class. When I say I want excel to open 'maximised' what I actually mean is I want it to open...
  15. W

    Error 424 when opening .xlsx from Access 2010

    I've already tried it without Set, without Set the spreadsheet opens minimised.
  16. W

    Error 424 when opening .xlsx from Access 2010

    The full error is 'Runtime error 424, Object required' This is the highlighted code: Set xlApp.UserControl = True Thanks
  17. W

    Error 424 when opening .xlsx from Access 2010

    Actually my OP isn't quite right. The spreadsheet opens as expected with the error message behind it - it's nothing to do with closing the form.
  18. W

    Error 424 when opening .xlsx from Access 2010

    Hi, when opening an excel spreadsheet from a link on a form the spreadsheet opens in a minimised state. Adding this line of code fixes the problem and opens the spreadsheet with focus. Set xlApp.UserControl = True However, when I close the spreadsheet there's an error message behind it - 424 -...
  19. W

    removing a digit from string

    Thanks for your help, this works (Left([PropertyID],9) & Right([PropertyID],3))
  20. W

    removing a digit from string

    Ok, Left([PropertyID],9) returns characters 1-9 Right([PropertyID],3) returns 11-13 Can I concatenate the two strings which will return everything except the 10th character? Something like Left(([PropertyID],9),Right([PropertyID],3))
Back
Top Bottom