Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA acting weird, advice plse.


I write VBA in Excel once or twice a year. Thus, I use the immediat
window a lot to check every line I write.

Can someone explain the following in immediate window:
activesheet.name - give me OK result
activesheet. - does not give me a drop down of choices
activecell. - does give me a drop down of choices
activesheet.usedrange - gives me a run time error.

What is going on? Do I have wrong libraries or dlls being used? How d
I know, how do I check? How do you know which libraries ar
attached/in-use/available, whatever is the correct words?

Also, I thought I was using (always) VBA. About Help says I'm usin
VB6.3

--
dpenn
-----------------------------------------------------------------------
dpenny's Profile: http://www.excelforum.com/member.php...fo&userid=1970
View this thread: http://www.excelforum.com/showthread.php?threadid=38175

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default VBA acting weird, advice plse.

activesheet.usedrange - gives me a run time error.

Maybe you meant
?activesheet.usedrange.address

I have no explanation for why activesheet. doesn't activate AutoList.

--
George Nicholson

Remove 'Junk' from return address.


"dpenny" wrote in
message ...

I write VBA in Excel once or twice a year. Thus, I use the immediate
window a lot to check every line I write.

Can someone explain the following in immediate window:
activesheet.name - give me OK result
activesheet. - does not give me a drop down of choices
activecell. - does give me a drop down of choices
activesheet.usedrange - gives me a run time error.

What is going on? Do I have wrong libraries or dlls being used? How do
I know, how do I check? How do you know which libraries are
attached/in-use/available, whatever is the correct words?

Also, I thought I was using (always) VBA. About Help says I'm using
VB6.3.


--
dpenny
------------------------------------------------------------------------
dpenny's Profile:
http://www.excelforum.com/member.php...o&userid=19708
View this thread: http://www.excelforum.com/showthread...hreadid=381753



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default VBA acting weird, advice plse.

"dpenny" wrote in
message ...
:
: I write VBA in Excel once or twice a year. Thus, I use the immediate
: window a lot to check every line I write.
:
: Can someone explain the following in immediate window:
: activesheet.name - give me OK result
: activesheet. - does not give me a drop down of choices

I quote this from a post by Stephen Bullen
"The reason is that some of Excel's 'global' objects, like ActiveSheet, can
refer to many different types of sheet, so it is declared 'As Object' in
the type library. It could, for example, by a Worksheet, a Chart, a
MacroSheet, a DialogSheet etc, so intellisense can't tell which type of
sheet to give you the indicators for.

When you declare a variable As Worksheet, intellisense knows that you're
refering to a Worksheet object; if the active sheet was any other type of
sheet when you ran your code, you'd get a run-time error.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk "

: activecell. - does give me a drop down of choices
: activesheet.usedrange - gives me a run time error.
:
: What is going on? Do I have wrong libraries or dlls being used? How do
: I know, how do I check? How do you know which libraries are
: attached/in-use/available, whatever is the correct words?

You can check your libraries available by using the object browser, or you
can open the reference window under the tools menu.

: Also, I thought I was using (always) VBA. About Help says I'm using
: VB6.3.

VBA is VB, and in the version of excel you are using it's VB6.3. The A
after VB just means it is meant to run in a specific application (i.e.
executable when run in excel) and not stand alone like VB which creates it's
own executable.
Paul D


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
Excel acting weird EAB1977 Excel Discussion (Misc queries) 1 September 30th 08 05:14 PM
Excel 2007 formulas acting weird MariaEll Excel Discussion (Misc queries) 7 November 2nd 07 07:56 PM
Excel Files Acting Weird Anat Excel Discussion (Misc queries) 0 March 29th 05 03:07 AM
Plse Advice Michael168[_21_] Excel Programming 4 October 5th 03 02:17 PM
Plse Help To Reduce Michael168[_22_] Excel Programming 2 October 5th 03 01:57 PM


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