Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Senior Member
 
Posts: 118
Default why the macro is not included in the list?

i opened a worksheet named "get the top".clicked on vba.view code then pasted a code.it is module No.11.minimised it.went to the excel file. when i tried to run the macro..it doesn't work. when i clicked on the macro under the code group i don't see the macro which i included recently.pls see that module number11 contains the code.(workbook_open)see pic 3 named macrolist in personal. there are only 4 macros listed there.module no.11 is not there.see pic no.2.there are a lot many modules in which no.11 is also there. my question is though in the module list, no.11 is present,why it is not coming when we click on macro under the code group? when i see the personal workbook only four macros are showing. where are others?
Attached Files
File Type: zip jpeg.zip (94.4 KB, 41 views)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default why the macro is not included in the list?

You can only see macros that aren't scoped *Private*, and do not take
arguments! Show the macro you want to run from the Macros dialog...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default why the macro is not included in the list?

Try...

In ThisWorkbook code window:

Option Explicit

Private Sub Workbook_Open()
Call SelectTopRow
End Sub


In a standard module:

Option Explicit

Sub SelectTopRow()
Rows(1).Select
End Sub

The above macro will now list in the Macros dialog!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #4   Report Post  
Senior Member
 
Posts: 118
Lightbulb

Quote:
Originally Posted by GS[_2_] View Post
Try...

In ThisWorkbook code window:

Option Explicit

Private Sub Workbook_Open()
Call SelectTopRow
End Sub


In a standard module:

Option Explicit

Sub SelectTopRow()
Rows(1).Select
End Sub

The above macro will now list in the Macros dialog!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Hi Garry,
thanks a lot. as you said when i changed the first line of the code, it is there in the macros dialog.what i understood is, there should not be the word "private" in the code.am i right?
  #5   Report Post  
Senior Member
 
Posts: 118
Default

Quote:
Originally Posted by sumesh56 View Post
Hi Garry,
thanks a lot. as you said when i changed the first line of the code, it is there in the macros dialog.what i understood is, there should not be the word "private" in the code.am i right?
I opened the worksheet. vba -click on the module and pasted yours. then i clicked on the macros in the code group. now i can see the code name in the list. But on vba doble clicked on the worksheet. clicked view code. pasted yours. went to macros. i cannot see the your macro there. it is not listed there. kindly detail it . thanks.


  #6   Report Post  
Senior Member
 
Posts: 118
Default

Quote:
Originally Posted by sumesh56 View Post
I opened the worksheet. vba -click on the module and pasted yours. then i clicked on the macros in the code group. now i can see the code name in the list. But on vba doble clicked on the worksheet. clicked view code. pasted yours. went to macros. i cannot see the your macro there. it is not listed there. kindly detail it . thanks.

this macro is not serving the purpose. I open a worksheet with so many sheets. i select one and copy contents from it. goes to the second sheet paste it there. then comes to the first one. then i should get the sheet with the top row. that is what i want. means i should get a sheet or a file open with the top row displayed. no matter if it is opened afresh or is being selected from a batch of sheets.thanks
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
macro's with if function included Josh[_16_] Excel Programming 3 November 14th 08 12:35 AM
Functions included in add-in Tony McGee Excel Programming 5 August 1st 07 03:55 PM
how do i change or make this macro??? pictures and code included dispelthemyth Excel Programming 1 March 17th 06 01:56 PM
how do i change or make this macro??? pictures and code included dispelthemyth Charts and Charting in Excel 0 March 17th 06 01:02 AM
Header included in sort Headersortproblem Excel Worksheet Functions 1 November 24th 04 04:48 PM


All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"