Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Macro Short Cut Key Issue

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Macro Short Cut Key Issue

If I put:

Sub hello()
MsgBox ("hello")
End Sub

in a module and assign CNTRL-e to it, and then export the module, the .bas
file shows:

Sub hello()
Attribute hello.VB_ProcData.VB_Invoke_Func = "e\n14"
MsgBox ("hello")
End Sub

--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

When I exported, I do not show that.

Mine shows:

Attribute VB_Name = "Module1"

That is the only time that "Attribute" shows up. Do I need to have each
short cut key controlled macro inits own module?

Thank you,
Roger

"Gary''s Student" wrote:

If I put:

Sub hello()
MsgBox ("hello")
End Sub

in a module and assign CNTRL-e to it, and then export the module, the .bas
file shows:

Sub hello()
Attribute hello.VB_ProcData.VB_Invoke_Func = "e\n14"
MsgBox ("hello")
End Sub

--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

Hey Sean,

I created a small macro and then exported to a .bas file and see the
attribute stuff that appears.

Attribute VB_Name = "Module2"
Sub Macro4()
Attribute Macro4.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute Macro4.VB_ProcData.VB_Invoke_Func = "i\n14"
'
' Macro4 Macro
' Macro recorded 11/29/2007 by Roger Converse
'
' Keyboard Shortcut: Ctrl+i
'
Cells.Select
Selection.ColumnWidth = 62.14
Selection.Rows.AutoFit
Selection.Columns.AutoFit
Range("A1").Select
End Sub

I can't seem to apply this to my module though. So if I just try to copy
and paste that into my module 1, I get a compile error on the word Attribute.

Any suggestions on how I can make this work?

Thank you,
Roger

"Roger Converse" wrote:

When I exported, I do not show that.

Mine shows:

Attribute VB_Name = "Module1"

That is the only time that "Attribute" shows up. Do I need to have each
short cut key controlled macro inits own module?

Thank you,
Roger

"Gary''s Student" wrote:

If I put:

Sub hello()
MsgBox ("hello")
End Sub

in a module and assign CNTRL-e to it, and then export the module, the .bas
file shows:

Sub hello()
Attribute hello.VB_ProcData.VB_Invoke_Func = "e\n14"
MsgBox ("hello")
End Sub

--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

Edited prior post.

"Roger Converse" wrote:

I created a small macro and then exported to a .bas file and see the
attribute stuff that appears.

Attribute VB_Name = "Module2"
Sub Macro4()
Attribute Macro4.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute Macro4.VB_ProcData.VB_Invoke_Func = "i\n14"
'
' Macro4 Macro
' Macro recorded 11/29/2007 by Roger Converse
'
' Keyboard Shortcut: Ctrl+i
'
Cells.Select
Selection.ColumnWidth = 62.14
Selection.Rows.AutoFit
Selection.Columns.AutoFit
Range("A1").Select
End Sub

I can't seem to apply this to my module though. So if I just try to copy
and paste that into my module 1, I get a compile error on the word Attribute.

Any suggestions on how I can make this work?

Thank you,
Roger

"Roger Converse" wrote:

When I exported, I do not show that.

Mine shows:

Attribute VB_Name = "Module1"

That is the only time that "Attribute" shows up. Do I need to have each
short cut key controlled macro inits own module?

Thank you,
Roger

"Gary''s Student" wrote:

If I put:

Sub hello()
MsgBox ("hello")
End Sub

in a module and assign CNTRL-e to it, and then export the module, the .bas
file shows:

Sub hello()
Attribute hello.VB_ProcData.VB_Invoke_Func = "e\n14"
MsgBox ("hello")
End Sub

--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Macro Short Cut Key Issue

Gary's Student:

Thank you for your assistance. I was able to take the information you
provided and figure out a way to get my shortcut keys back in business.

FYI - What I ended up doing was copying each macro to a .bas file and then
manually setting the Attirbutes to the short cut key (based on your example)
that I wanted and then re-imported the macro into their own modules. It is
working now, so my fingers are crossed that they will continue to do so.

So, every module contains one macro whose heading (when exported) looks like
this:

Attribute VB_Name = "Module1"
Sub macOpenPO()
Attribute macOpenPO.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute macOpenPO.VB_ProcData.VB_Invoke_Func = "o\n14"

I would imagine you could do something like below, but did not try:

Attribute VB_Name = "Module1"
Sub macOpenPO()
Attribute macOpenPO.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute macOpenPO.VB_ProcData.VB_Invoke_Func = "o\n14"
.....rest of macro

Sub macLow_Stock()
Attribute macLow_Stock.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute macLow_Stock.VB_ProcData.VB_Invoke_Func = "l\n14"
.....rest of macro

Thank you for the assistance! Without it, I would still be stuck.

Thank you,
Roger


"Roger Converse" wrote:

Edited prior post.

"Roger Converse" wrote:

I created a small macro and then exported to a .bas file and see the
attribute stuff that appears.

Attribute VB_Name = "Module2"
Sub Macro4()
Attribute Macro4.VB_Description = "Macro recorded 11/29/2007 by Roger
Converse"
Attribute Macro4.VB_ProcData.VB_Invoke_Func = "i\n14"
'
' Macro4 Macro
' Macro recorded 11/29/2007 by Roger Converse
'
' Keyboard Shortcut: Ctrl+i
'
Cells.Select
Selection.ColumnWidth = 62.14
Selection.Rows.AutoFit
Selection.Columns.AutoFit
Range("A1").Select
End Sub

I can't seem to apply this to my module though. So if I just try to copy
and paste that into my module 1, I get a compile error on the word Attribute.

Any suggestions on how I can make this work?

Thank you,
Roger

"Roger Converse" wrote:

When I exported, I do not show that.

Mine shows:

Attribute VB_Name = "Module1"

That is the only time that "Attribute" shows up. Do I need to have each
short cut key controlled macro inits own module?

Thank you,
Roger

"Gary''s Student" wrote:

If I put:

Sub hello()
MsgBox ("hello")
End Sub

in a module and assign CNTRL-e to it, and then export the module, the .bas
file shows:

Sub hello()
Attribute hello.VB_ProcData.VB_Invoke_Func = "e\n14"
MsgBox ("hello")
End Sub

--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

Thank you for the response. Well, since I record and don't write my own
macros, the code behind them just showed up in modules. I tried moving
evrything into module 1 thinking that there would be no reason to have a
bunch of modules that just housed one macro. I never really tried to copy
from one workbook to another workbook.

When I exported the module to my desktop and received the .bas file, I see
the following (which I can also see in editor):

Sub PvtTbl()

' PvtTbl Macro
' Macro recorded 11/27/2007 by Roger Converse

' Keyboard Shortcut: Ctrl+p

That is how all the macros I have created look, so I am not sure as to what
the issue is now.

Thanks,
Roger

"Gary''s Student" wrote:

It all depends on how you move them. If you just copy/paste the macro text
from one workbook to another, the shortcuts may not follow.

You should export the macro to a file and then import the macro to the new
workbook.


Try exporting a short-cut assigned macro to your desktop. A .bas file will
result. Examine the .bas file in NotePad and you should see the short-cut
reference.
--
Gary''s Student - gsnu200759


"Roger Converse" wrote:

So I created a few macros that run on shortcut keys. Somehow, I moved them
to a place where the shortcut keys aren't recognized. I can still run the
macros via menu options, but don't have the "ctlr + button" control that I
used to. Anyone else come across this issue?

Thanks,
Roger

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
Short Macro Joonas K Excel Discussion (Misc queries) 0 August 7th 08 05:31 PM
Please Help with Short Macro zulfer7 Excel Programming 1 March 12th 07 04:37 PM
ZED - Need a short macro fix [email protected] Excel Discussion (Misc queries) 3 January 19th 07 03:32 PM
Onkey vs Macro Short cut key rgarber50 Excel Discussion (Misc queries) 1 July 10th 05 07:34 PM
Macro short cut key Vispy Excel Programming 1 December 4th 03 06:07 AM


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