Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Write VBA code into a sheet module using VBA

Hello, I posted some questions regarding this issue earlier, then posted back because I thought I had solved my issues, but my code is still unstable. Please help.

I have a program that performs the following:

1. Create a new "Report" sheet on user demand (the new "Report" sheet replaces the existing "Report" sheet)
€” This I have and it functions fine;

2. Write a small VBA procedure into the sheet module of the "Report" sheet everytime it is rebuilt using VBA.

My step "2" once it is completed, sometimes causes my Excel XP (Win 2000) to generate a fatal error and Excel closes. I placed a save after the procedure so the file is saved before the crash and when I reopen the file, everything is as it should be, but obviously I don't want my app to crash "occasionally" (like every third time or so).

Could someone please supply me with some example code on how to do this? I am not posting my code since it obviously is no good, but if you want it I can post it.

Thanks in advance for your assistance.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code won't run from a module Geoff Excel Discussion (Misc queries) 3 February 20th 07 08:08 PM
Unprotect Code Module in Code Damien Excel Discussion (Misc queries) 2 April 18th 06 03:10 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"