seadoggie01 Posted July 29, 2020 Share Posted July 29, 2020 I tried using some code like this earlier and was surprised to see it fail: With .Sheet(1) ; ... With .Range($myRange) ; ^-- "C:\test.au3" (105) : ==> Object referenced outside a "With" statement.: .Interior.ColorIndex = 44 .Borders.ColorIndex = 0 EndWith EndWith It doesn't allow me to use the previous reference to ".Sheet(1)" inside the second With statement. Is this a bug or this intended? (Coming from VBA, it looks like a bug ) All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
Musashi Posted July 29, 2020 Share Posted July 29, 2020 18 minutes ago, seadoggie01 said: Is this a bug or this intended? I assume it's deliberate, see : https://www.autoitscript.com/autoit3/docs/appendix/Exitcodes.htm 0x7FFFF0A8 : Nested "With" statements are not allowed. seadoggie01 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now