UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> VBA Editor Formatting - What Is Call Return Text?, Any Versions    
 
   
JonSmith
post Feb 24 2017, 09:09 AM
Post#1



Posts: 3,161
Joined: 19-October 10



Hi guys,

If you go to the VBA options there is a tab called Editor Format where you can specify the colours that are displayed in VBA depending on the type of text, for example comments by default are green.

There is one type of text in this I am ignorant of and am hoping someone can enlighten me.
What is 'Call Return Text'?

JS
Go to the top of the page
 
doctor9
post Feb 24 2017, 09:28 AM
Post#2


UtterAccess Editor
Posts: 17,924
Joined: 29-March 05
From: Wisconsin


JonSmith,

My guess is that it refers to when you do something like this:

CODE
Call CleanUpForm("frmPurchasedEquipment")


Where "CleanUpForm" is a subroutine located elsewhere in the same module/project.

Hope this helps,

Dennis

--------------------
(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
JonSmith
post Feb 24 2017, 10:25 AM
Post#3



Posts: 3,161
Joined: 19-October 10



Hahaha Dennis. I am not that simple and had already tried stuff like that. I would have worked it out if it was that.

See attached on the screenshot. The code you suggest doesn't change to the relevant colours so isn't a Call Return Text value.
Attached File(s)
Attached File  Capture.PNG ( 51.38K )Number of downloads: 4
 
Go to the top of the page
 
mklein
post Feb 24 2017, 11:02 AM
Post#4



Posts: 264
Joined: 7-August 12
From: BC, Canada


I think Dennis is correct. If Sub A calls Sub B...
CODE
Sub A
   B
End Sub

Sub B
   Debug.Assert False
End Sub

...then when the breakpoint is hit in Sub B, open the "Call Stack" viewer, and double-click Sub A in that view. Notice the sideways caret indication in the margin in Sub A for the call to Sub B? That is your "Call Return Text." It's only active while code is running, and only when you drill down into the execution stack.
hth

--------------------
| Mark Klein | Access 2010 | Windows 10 | Visual Studio 2013
Go to the top of the page
 
mklein
post Feb 24 2017, 11:44 AM
Post#5



Posts: 264
Joined: 7-August 12
From: BC, Canada


But, on further testing, it looks like the only active setting is the indicator color. The foreground and background don't seem to change.

--------------------
| Mark Klein | Access 2010 | Windows 10 | Visual Studio 2013
Go to the top of the page
 
JonSmith
post Feb 24 2017, 01:06 PM
Post#6



Posts: 3,161
Joined: 19-October 10



Nice! I haven't used the call stack before so wasn't aware of that.

I agree, only the icon changes the colour.
Thanks for clearing that up for me!!
Go to the top of the page
 
mklein
post Feb 24 2017, 02:06 PM
Post#7



Posts: 264
Joined: 7-August 12
From: BC, Canada


Yes, the Call Stack is very rich, because you can examine the state of all the variables in all the procedures in the call chain up to and including the one in which code is currently paused, so anytime Sub A calls Sub B, Sub A is pushed onto the stack, awaiting the completion of Sub B. Then if Sub B calls another routine, again, pushed onto the stack, and all that state is current and all those variables are live.

--------------------
| Mark Klein | Access 2010 | Windows 10 | Visual Studio 2013
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th December 2017 - 06:18 PM