Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007: Simple VBA Procedures not showing in Macros List 1

Status
Not open for further replies.

kjv1611

New member
Jul 9, 2003
10,758
US
Seems like this should be something simple, but apparently it's not, or I'm badly overlooking it.

In Excel 2007, I just create a VBA procuedure which I wanted to test and set to a button in the quick access toolbar. Well, I created the code, but it doesn't show in the Macros list.

Code:
Private Sub PasteSpec_Values()
    Selection.PasteSpecial Paste:=xlPasteValues
End Sub

According to this article:

It sounds like if the code includes a parameter, then it won't show in that list. Well, this code doesn't include any parameters. Also, I tried compiling, saving everything, closing and reopening Excel.

The code is in the Modules section of my PERSONAL.XLS worksheet... is it also possible that I need to resave my PERSONAL.XLS worksheet to PERSONAL.XLST for some of the code to show up in my Macros list?? The reason its in XLS format is b/c I just copied up the PERSONAL.XLS from when I used Office 2003.

Thanks for any advice/suggestions/references/jabs. [wink]

--

"If to err is human, then I must be some kind of human!" -Me
 



Try removing the PRIVATE.

You ought to be able to find a ToolBar Icon that does PasteValues. No VBA required.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Probably, but of course I didn't look. [glasses]

--

"If to err is human, then I must be some kind of human!" -Me
 
Just verified it - yep, you were right on the "remove PRIVATE" part. Duh - Me. [wink]

Maybe I'll look later for a built-in toolbar button for that... seems I found one before. But I don't remember. And I'll probably forget to look [cyclops]

--

"If to err is human, then I must be some kind of human!" -Me
 


As I recall, it looks like a clipboard with a 12 on it, at least in 2003.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top