473,414 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,414 developers and data experts.

Excel VBA “ run time error 40036 application-defined or object error”.

I have found a workaround to the Excel VBA “ run time error 40036 application-defined or object error”. It does not fix the original problem, which is in excel, SOMEWHERE.

A few responses I have seen have shown a simple program which could not select a screen, or cell on one. Here is a simpler one ….. 1 line.

“nsgbox ActiveSheet.Name”

Test this on the screen giving the problem. It will fail.
Test it on another screen. It works, unless the other one is a problem.

The workaround is simple but may not be complete.
1) Rename the tab with the screen name
2) Create a new tab
3) Copy the old screen contents to the new one.
4) Rename the new one to the original name.
5) Do not forget to copy formats and the screen vba objects Sheet text.
That is it.

The workaround leaves a couple of unanswered questions.
A bit of speculation. Excel seems to have lost the connection of the Screen name to the screen number. Using screen numbers may be better, but are too confusing.
I have had other inconsistent problems with the screen, which may be related. For instance, a known error when trying to hide columns. Worse yet the “on error xxxxx “ command does not work. I have not yet tried that on the new screen. It may be an answer to that problem also.

If none of this works and Excel is totally screwed up, as it sometimes is my other “General Solution” is worth trying. It is also worth trying if you have a program you have been working on for a while and has a lot of redone or deleted sections, and is BIG.

1) Open a new file
2) Create the same tabs
3) Copy over all pages and scripts
4) Avoid copying objects. Recreate them (Copying should not be a major issue if there are lot of objects)
5) DEBUG
Apr 28 '11 #1
0 12117

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rambo | last post by:
Can someone post the needed code to help me export from my application to excel? I have been trying to do this but I can't get it to work. Can some give some documentation on this? ___ thanks...
2
by: JT | last post by:
Hi, I've read (and tried) the article "How To Automate Microsoft Excel from Microsoft Visual C# .NET" (available at http://support.microsoft.com/default.aspx?kbid=302084). This opens up Excel,...
1
by: TaeHo Yoo | last post by:
How to convert a dataset to excel spreadsheet in windows based application?? Thanks a lot in advance. *** Sent via Devdex http://www.devdex.com *** Don't just participate in...
1
by: Gerry | last post by:
I have an ASP.NET application installed on a Windows Server 2003 computer. MS Excel is also installed on the same computer. And yes, the application makes use of Excel. When the Application Pool...
5
by: Matt Bailey | last post by:
Good afternoon, I have an asp.net project wherein I am trying to export data into excel. I have that working, however, I am typically dealing with a large volume of data when I do this. Can...
7
by: Paul | last post by:
Hi I have created an excel file download feature within a .net application using Microsoft Office XP primary interop assembly for excel. I was just wondering if anyone knows if you can also embed...
18
by: Dirk Hagemann | last post by:
Hello, From a zone-file of a Microsoft Active Directory integrated DNS server I get the date/time of the dynamic update entries in a format, which is as far as I know the hours since january 1st...
0
by: meldrum_scotland | last post by:
Hi, I am learning VB2005 and I've created a basic program that creates an Excel spreadsheet and then closes the program leaving the Excel spreadsheet active. The program works great when I...
0
by: bigN | last post by:
I didn't know where to post this question, but this was as close as I could get. I have an excel application which I want to transfer to winform C#. Brief Description of Application 1.) In my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.