Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listbox Change events triggering when i "Save As"

I've got a setup with 2 excel spreadsheets: a Parent and a Child. The
child contains a number of Listboxes that when changed run different
macros to update the data.

The Parent has a VBA macro that opens the Child, ammends some data and
then Saves the child as a different filename using the Save As
function. The SaveAs function then runs the Listbox macros in the
Child, but these can't complete properly for some unknown reason.
Accordingly I get VBA crashing out.

I've spent the majority of the afternoon searching through various
groups on the web to try and find a way of disabling the Listbox
macros (or forcing them to run before the Save As) or any other
workaround i can find. And I think i've tried every possible version
of Enabling/Disabling events to no avail.

Can anyone help me. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default Listbox Change events triggering when i "Save As"

G'day Magnus

If you want to disable any VBA statements in your code simply type "REM"
(minus the quotes) at the front of the command line, it will then turn it
red and it will not execute that portion of the code.

Paste your code here so we can look it over and pinpoint any anomalies.

HTH
Mark.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Listbox Change events triggering when i "Save As"

On 25 Nov, 17:30, "NoodNutt" wrote:
G'day Magnus

If you want to disable any VBA statements in your code simply type "REM"
(minus the quotes) at the front of the command line, it will then turn it
red and it will not execute that portion of the code.

Paste your code here so we can look it over and pinpoint any anomalies.

HTH
Mark.


Thanks Mark,

Thats a trick I wasn't aware of but I don't think it will solve the
problem. Because the listbox macros are needed for daily usage of the
spreadsheet, I can't stop the macros from running at all times using
the above idea. Instead I need to be able to either stop the automatic
running durring the Save As or find another way around the problem.
Because the Listbox macros are starting on automatically i also can't
pass a variable through to them that could be used to "REM" the code.

If I was initiating the macros this would work well.

I can post up code if you like, but i just think that will confuse the
issue more. I'm just trying to prevent the Listbox events from running
durring the Save As, but to leave them running the rest of the time.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Listbox Change events triggering when i "Save As"

I think i've found a way around this. I've stopped using Listboxes.
Instead i'm using ComboBoxes that i've changed into effective dropdown
lists. They seem to be a lot more stable than the Listboxes.

It solves the problems for just now anyway.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Listbox Change events triggering when i "Save As"

If you have an old version of your workbook, maybe you could try this (I think
I'm remembering it correctly)...

If you have a linked cell for that listbox, make sure it's on a different
worksheet.
If you have the listfillrange on the same worksheet, put it on a different
worksheet.

Another option would be to drop both the linkedcell and listfillrange and use
code to populate the listbox and assign the value to a cell.

wrote:

I think i've found a way around this. I've stopped using Listboxes.
Instead i'm using ComboBoxes that i've changed into effective dropdown
lists. They seem to be a lot more stable than the Listboxes.

It solves the problems for just now anyway.


--

Dave Peterson


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
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
Listbox header inside VBA (Array("Head1", "Head2", ...) Alex St-Pierre Excel Programming 2 October 25th 06 09:28 PM
how to change default file name in "save as" or "save" gerard Excel Programming 1 July 24th 03 10:58 PM


All times are GMT +1. The time now is 10:13 PM.

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

About Us

"It's about Microsoft Excel"