ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find the Error in my Code Please (https://www.excelbanter.com/excel-programming/361335-find-error-my-code-please.html)

Christine

Find the Error in my Code Please
 
Just trying to select the data table and then have the SORT tool appear on
the screen. This code worked last night but when i bring up the file this
morning I kept getting the following error: Run-time error '1001' Show method
of Dialog class failed. Where have I gone wrong? THANKS!


Sub Button22_Click()
ActiveSheet.Range(Cells(8, 1), Cells(237, 12)).Select
Application.Dialogs(xlDialogSort).Show
End Sub


Barry-Jon

Find the Error in my Code Please
 
Works for me. Did you change ANYTHING? E.g. move the module from one
workbook to another etc...?


[email protected]

Find the Error in my Code Please
 
My GUESS would be that the workbook is protected - which would stop the
sort dialog being displayed


Christine

Find the Error in my Code Please
 
As far as I know I hadn't changed a thing - just opened the file.
Just incase I had done something wrong i started in a brand new file from
scratch without any other macros or anything i just put in some random data
and tried to get this code to work and to no avail.

"Barry-Jon" wrote:

Works for me. Did you change ANYTHING? E.g. move the module from one
workbook to another etc...?



Barry-Jon

Find the Error in my Code Please
 
What version of Excel are you using? What OS? Have you got a full
office installation? Have you installed or changed the installation of
any applications on the machine causing the problem? Does it work on
any other machines?



All times are GMT +1. The time now is 04:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com