PC Review


Reply
Thread Tools Rate Thread

"Code Page" ??

 
 
(PeteCresswell)
Guest
Posts: n/a
 
      18th Jun 2007
I'm trying to put in some "AfterUpdate" processing.

Something I Googled advises:

"All you need to do is select the code page for the worksheet in
question, select the drop down at the top left (which should say
'(general)'), pick 'Worksheet' then select the 'Change' member of
the drop down on the right. This will give you the Event sub."

But how to find the "Code page for the worksheet"?

Otherwise, it sounds like the MS Access development environment.

All I see is Tools|Macros - which will get me to a code window,
but that code window lacks the drop down at the top left that
lets me point to "General" or various control names.

What am I missing?
--
PeteCresswell
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      18th Jun 2007
One way:-

Right click the page tab and view code

Mike

"(PeteCresswell)" wrote:

> I'm trying to put in some "AfterUpdate" processing.
>
> Something I Googled advises:
>
> "All you need to do is select the code page for the worksheet in
> question, select the drop down at the top left (which should say
> '(general)'), pick 'Worksheet' then select the 'Change' member of
> the drop down on the right. This will give you the Event sub."
>
> But how to find the "Code page for the worksheet"?
>
> Otherwise, it sounds like the MS Access development environment.
>
> All I see is Tools|Macros - which will get me to a code window,
> but that code window lacks the drop down at the top left that
> lets me point to "General" or various control names.
>
> What am I missing?
> --
> PeteCresswell
>

 
Reply With Quote
 
=?Utf-8?B?U2hhc3Vy?=
Guest
Posts: n/a
 
      18th Jun 2007
On the left side of the code pane [(Use Alt + F11) from your workbook - If
the code pane is not visible - use View from VBA menu -->Project Explorer]
you will find your workbook project - for example, VBAProject (Book1)-->
Below that you will find Microsoft Excel Objects --> Sheet1, Sheet2 etc.

Just double click the Sheet1, which will open the code page for the
correspondig sheet

Here you need to select Worksheet in the first dropdown and the
corresponding event in the next dropdown

If you are looking for workbook event, then you should do the same (double
click on the ThisWorkbook in the project explorer)

Cheers
Shasur


--
http://vbadud.blogspot.com


"(PeteCresswell)" wrote:

> I'm trying to put in some "AfterUpdate" processing.
>
> Something I Googled advises:
>
> "All you need to do is select the code page for the worksheet in
> question, select the drop down at the top left (which should say
> '(general)'), pick 'Worksheet' then select the 'Change' member of
> the drop down on the right. This will give you the Event sub."
>
> But how to find the "Code page for the worksheet"?
>
> Otherwise, it sounds like the MS Access development environment.
>
> All I see is Tools|Macros - which will get me to a code window,
> but that code window lacks the drop down at the top left that
> lets me point to "General" or various control names.
>
> What am I missing?
> --
> PeteCresswell
>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      18th Jun 2007
If you right-click worksheet tab at the bottom of the page, you can choose
"View Code" to go to that sheet's code module in the VBA editor. See also
http://www.cpearson.com/excel/codemods.htm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)




"(PeteCresswell)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to put in some "AfterUpdate" processing.
>
> Something I Googled advises:
>
> "All you need to do is select the code page for the worksheet in
> question, select the drop down at the top left (which should say
> '(general)'), pick 'Worksheet' then select the 'Change' member of
> the drop down on the right. This will give you the Event sub."
>
> But how to find the "Code page for the worksheet"?
>
> Otherwise, it sounds like the MS Access development environment.
>
> All I see is Tools|Macros - which will get me to a code window,
> but that code window lacks the drop down at the top left that
> lets me point to "General" or various control names.
>
> What am I missing?
> --
> PeteCresswell


 
Reply With Quote
 
(PeteCresswell)
Guest
Posts: n/a
 
      19th Jun 2007
Per Shasur:
>[(Use Alt + F11) from your workbook - If
>the code pane is not visible - use View from VBA menu -->Project Explorer]
>you will find your workbook project - for example, VBAProject (Book1)-->
>Below that you will find Microsoft Excel Objects --> Sheet1, Sheet2 etc.


Thanks Shasur, Mike, Chip - I'm on the path to enlightenment
now....

At the risk of turning into a tarbaby on you...

Given that I'm in Worksheet_Change() and I have access to
Target.Address - and the worksheet is *not* using R1C1 notation -
how would I go about identifying various cells relative to
Target.Address.

My immediate interest is in clearing the cell immediately to the
right.

I'm working though a multi-column Validation example where the
validation of column B changes depending on what was selected in
column A - so, in the real world, it would seem necessary to
clear the contents of column B if the user changes column A -
since a different list would then be in effect.

If I were in R1C1 notation, I'd parse Target.Address into R and
C, and then increment C or R depending on where I wanted to go.

--
PeteCresswell
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lost the "Design, Split, Code, Preview" buttons in the "Page View" GSOutdoorsman Microsoft Frontpage 1 22nd Apr 2009 07:58 AM
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
Page Numbering: How Do I Set Footer to give Page "X" of "Y" Total Number of Pages? Stephen Kroll Microsoft Word Document Management 1 17th Aug 2008 06:04 AM
What does "Page Load" and "Page Unload", "Page Life Cycle" exactlymean???? lander Microsoft ASP .NET 5 3rd Mar 2008 02:06 PM
Re: Method "Display" of object "mailitem" failed -2147221441 (80040107) when running code in background, code works when stepping through Carol Chisholm Microsoft Outlook VBA Programming 1 6th Sep 2005 03:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:17 AM.