LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Parenthesis - to use or not to use?

Thanks to everyone for their replies. I figured out on the nature of
my error. For my own subroutines I always call them using the call
keyword, in which parenthesis are required. I pretty much use message
boxes only for debugging purposes, and with 1 parameter () are
ignored. A little experimentation shows that 2 or more parameters with
() as I have been doing leads to problems.

My way to think about it now - msgbox( , , ..) is a noun that must be
embedded in a bigger context to make sense, but in msgbox "hello
world" msgbox is now functioning as a verb.

In my defense - when I type msgbox in the VBA editor the IntelliSense
which pops up suggests (), and sinse my code was compiling no-problem
I didn't realize I was being ungrammatical. It is strange how you can
misunderstand a basic feature of a language but nevertheless get by
with your own idiosyncratic work-arounds.

sub thanks()
MsgBox Prompt := "Now I understand", Title:= "Thanks again"
end sub

-John Coleman


 
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
MISSING PARENTHESIS Kanmi Excel Worksheet Functions 3 June 26th 09 10:51 PM
parenthesis puiuluipui Excel Discussion (Misc queries) 2 May 27th 08 01:59 PM
Short key for parenthesis - Hot key Anders Excel Discussion (Misc queries) 0 December 19th 07 09:09 AM
Parenthesis problem gmangrove Charts and Charting in Excel 1 December 21st 06 03:11 AM
WHAT ARE PARENTHESIS IN FORMULAS? ann New Users to Excel 2 August 21st 06 10:43 PM


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