Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default getMacroRegId displayed in Immediate window

Hi,

My app uses functions in the Analysis tool pack. I switched to Excel
2003 and now the Immediate window has the following junk. Does Excel
2007 have the same problem with this junk?

Below is the junk.

[auto_open] <
[SetupFunctionIDs] <
[SetupFunctionIDs]
[PickPlatform] <
[PickPlatform]
[VerifyOpen] <
[VerifyOpen] 1
[RegisterFunctionIDs] <
[RegisterFunctionIDs]
[auto_open]
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '1555300407'
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '-917438410'
etc etc... about 10,000 times


Considering my app calls DEC2HEX about 10,000 times this makes the
Immediate window useless for displaying status messages from my VBA
program.

I know I can erase this stuff but I'm trying to get a solution so it's
not displayed in the first place.

Duane

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default getMacroRegId displayed in Immediate window

Hi

Here is an idea (less than ideal but maybe better than nothing) -
create your own window for displaying status messages.

As an experiment I created a modeless userform (ShowModal set to
False) named frmStatus (and captioned "Status Window" but so what)
that contained nothing but a text box named tbStatus with multiline
set to true (I don't know if that was really needed) and Scrollbars
set to option 3. Then in a general code module I wrote:

Sub PrintStatus(msg As Variant)
frmStatus.tbStatus.Text = _
frmStatus.tbStatus.Text & msg & vbCrLf
DoEvents
End Sub

It is used like this (note the need to show the form explicitly in any
sub that wants to use it):

Sub test()
Dim i
frmStatus.Show
For i = 1 To 10000000
If i Mod 10000 = 0 Then
PrintStatus i
End If
Next i
End Sub

I agree that it is a shame that the Analysis tool pack trashes the
intermediate window so much, but hopefully the above could be of some
use.

-John Coleman



On Feb 10, 11:24 am, "bigHatNoCattle" wrote:
Hi,

My app uses functions in the Analysis tool pack. I switched to Excel
2003 and now the Immediate window has the following junk. Does Excel
2007 have the same problem with this junk?

Below is the junk.

[auto_open] <
[SetupFunctionIDs] <
[SetupFunctionIDs]
[PickPlatform] <
[PickPlatform]
[VerifyOpen] <
[VerifyOpen] 1
[RegisterFunctionIDs] <
[RegisterFunctionIDs]
[auto_open]
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '1555300407'
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '-917438410'
etc etc... about 10,000 times

Considering my app calls DEC2HEX about 10,000 times this makes the
Immediate window useless for displaying status messages from my VBA
program.

I know I can erase this stuff but I'm trying to get a solution so it's
not displayed in the first place.

Duane



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default getMacroRegId displayed in Immediate window

Another idea
It is possible to use the PrintStatus sub without first showing or at
least loading the userform (I would have guessed that it would have
thrown a run-time error). Evidently the first attempt to write
something to the textbox loads the form automatically. Thus - you can
simply comment out the line frmStatus.Show if you don't want the
status messages to be explicilty shown. Furthermore - if one of your
purposes of wanting to write to the immediate window is to keep an
informal log of a run to be looked at later, then you can write the
contents of the textbox to the immediate window just prior to exiting
your program. This will prevent the status messages from being
interspersed with the toolpack garbage. A possible use case could look
like:

Sub test()
Dim i
'frmStatus.Show 'comment out to record status silently
For i = 1 To 10000000
If i Mod 1000000 = 0 Then
PrintStatus i
End If
Next i
Debug.Print frmStatus.tbStatus.Text
Unload frmStatus 'comment this out if you want to show the window
End Sub

HTH

-John Coleman



On Feb 10, 8:09 pm, "John Coleman" wrote:
Hi

Here is an idea (less than ideal but maybe better than nothing) -
create your own window for displaying status messages.

As an experiment I created a modeless userform (ShowModal set to
False) named frmStatus (and captioned "Status Window" but so what)
that contained nothing but a text box named tbStatus with multiline
set to true (I don't know if that was really needed) and Scrollbars
set to option 3. Then in a general code module I wrote:

Sub PrintStatus(msg As Variant)
frmStatus.tbStatus.Text = _
frmStatus.tbStatus.Text & msg & vbCrLf
DoEvents
End Sub

It is used like this (note the need to show the form explicitly in any
sub that wants to use it):

Sub test()
Dim i
frmStatus.Show
For i = 1 To 10000000
If i Mod 10000 = 0 Then
PrintStatus i
End If
Next i
End Sub

I agree that it is a shame that the Analysis tool pack trashes the
intermediate window so much, but hopefully the above could be of some
use.

-John Coleman

On Feb 10, 11:24 am, "bigHatNoCattle" wrote:



Hi,


My app uses functions in the Analysis tool pack. I switched to Excel
2003 and now the Immediate window has the following junk. Does Excel
2007 have the same problem with this junk?


Below is the junk.


[auto_open] <
[SetupFunctionIDs] <
[SetupFunctionIDs]
[PickPlatform] <
[PickPlatform]
[VerifyOpen] <
[VerifyOpen] 1
[RegisterFunctionIDs] <
[RegisterFunctionIDs]
[auto_open]
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '1555300407'
[GetMacroRegId] 'DEC2HEX' <
[GetMacroRegId] 'DEC2HEX' - '-917438410'
etc etc... about 10,000 times


Considering my app calls DEC2HEX about 10,000 times this makes the
Immediate window useless for displaying status messages from my VBA
program.


I know I can erase this stuff but I'm trying to get a solution so it's
not displayed in the first place.


Duane- Hide quoted text -


- Show quoted text -



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
how files are displayed in the open file window Brett Excel Discussion (Misc queries) 4 February 21st 08 08:51 PM
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
[GetMacroRegId] in Immediate window bigHatNoCattle[_2_] Excel Programming 18 March 26th 07 05:53 PM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
Control record displayed in DataForm window buczacz Excel Programming 3 September 19th 03 02:19 AM


All times are GMT +1. The time now is 01:43 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"