Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 02-09-2010, 03:51 PM
shawnh shawnh is offline
Registered User
 
Join Date: 18 Jan 2010
Location: Nova Scotia, Canada
MS Office Version:Excel 2003
Posts: 45
shawnh is becoming part of the community
Strange behaviours while typing code in VBA editor

Please Register to Remove these Ads

Hi all... this is probably gonna sound really stupid, but how come when I try to type in some code in the VBA Editor, things act all weird:

- the text I'm typing sometimes gets all "rearranged" automatically (ie. first letter I type will be at the end all of a sudden)
- the text of the current line I'm on turns all red
- In the middle of typing something, a window will pop up "Syntax Error" even before I'm done typing.

... it's really frustrating. As you can gather, I'm a VBA newbie..

Thanks!
Shawn
Reply With Quote
  #2  
Old 02-09-2010, 04:40 PM
JP Romano's Avatar
JP Romano JP Romano is offline
Forum Contributor
 
Join Date: 09 Oct 2008
Location: Princeton, NJ
MS Office Version:2007 at work. Abacus at home
Posts: 169
JP Romano has been very helpful
Re: Strange behaviours while typing code in VBA editor

Shawn - it almost sounds like something else is running in the background... another macro from another book, perhaps?
__________________
Who believes in telekinesis... raise my hand!
Reply With Quote
  #3  
Old 02-09-2010, 04:56 PM
sauerj sauerj is offline
Registered User
 
Join Date: 11 Nov 2009
Location: Lafayette, IN
MS Office Version:Excel 2003
Posts: 56
sauerj is becoming part of the community
Smile Re: Strange behaviours while typing code in VBA editor

Hello,
* The 1st issue is kinda wierd, but the other two sound like normaI design errors.
* I am a newbie to Excel VBA also. After struggling with it for months (getting tips & help over the internet), I finally went and bought a book for $25 at the local B&N. Probably shouldn't endorse book on forum (not sure if that is proper or not). Point Here: It was the best thing I've done to help me get a better handle on VB; I should have done it months ago.
* This book defines 4 levels of errors: 1) Design errors, 2) Compile errors, 3) Runtime errors, 4) Logicial Errors. The latter two issues, sound like Design errors. They happen to all of us. If you don't type something right (like an If Then statement), or put an '=' in without filling the right side and move off the line, then you get this error. You just have to OK the alarm, and move on.
* Not sure what might be causing the 1st issue. ... Regards, sauerj
Reply With Quote
  #4  
Old 02-09-2010, 04:58 PM
shg's Avatar
shg shg is offline
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,344
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Strange behaviours while typing code in VBA editor

Quote:
Probably shouldn't endorse book on forum (not sure if that is proper or not).
Totally proper, endorse away if you liked it.
__________________
Entia non sunt multiplicanda sine necessitate.
Reply With Quote
  #5  
Old 02-09-2010, 05:03 PM
shawnh shawnh is offline
Registered User
 
Join Date: 18 Jan 2010
Location: Nova Scotia, Canada
MS Office Version:Excel 2003
Posts: 45
shawnh is becoming part of the community
Re: Strange behaviours while typing code in VBA editor

Thanks all... nope, there's no other workbook running in the background. Just my one main workbook that has several sheets and live DDE data coming into it - maybe that has something to do with it?

Regarding my VBA editing problems, I see a "Reset" and a "Break" button in the toolbar at top. Should they be set in any particular way when I'm trying to type?
Reply With Quote
  #6  
Old 02-09-2010, 05:12 PM
sauerj sauerj is offline
Registered User
 
Join Date: 11 Nov 2009
Location: Lafayette, IN
MS Office Version:Excel 2003
Posts: 56
sauerj is becoming part of the community
Talking Re: Strange behaviours while typing code in VBA editor

Thanks "shg"! ... Thanks a lot for your past help to me!
1) The book is "Excel Programming, Your visual blueprint for creating interative spreadsheets", 2nd Ed., by Jinjer Simon, Wiley Publishing, Inc, 2005.
2) It is 300 pages, comes with a disc containing electronic version of book and example macros. I'm about 50% thru it. I've found a few typos and maybe 1-2 errors, but it is SO easy to read and understand.
3) What really HELPED me a lot was explaining 1) what Excel means by Objects, and 2) Introducing me to the Object Browser, what it is, how to use, etc. WOW! finally things started to make some sense; and what a powerful tool this Obj-Browser offers. ... A book may not be for everyone (takes time to read), but sure worked for me.
4) Of course, the internet is very helpful too. And, when I'm really stomped, this forum is TOP-NOTCH!
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump