CTRL+Y in VBA IDE

A

aaron.kempf

why does CTRL+Y delete a line of code?

I'm jsut curious.

I write Access VBA all day long.. and i've been burnt by this a couple
of times these past 10 years lol

CTRL+Z is undo in the VBA IDE.

CTRL+Y -- which should be REDO-- it DELETES A LINE OF CODE

anyone else ever notice this?
 
G

Guest

Aaron,

According to KB 140637, CTRL+Y does exactly what you are observing:

Cut the current line and copy it to the Clipboard CTRL+Y

http://support.microsoft.com/?id=140637

Although this article includes (95/97) in it's title, I'd be hard-pressed to
believe that this shortcut key combination was remapped to different
functionality in later versions of Access. (I couldn't find a similar KB
article for a newer version of Access).


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

why does CTRL+Y delete a line of code?

I'm jsut curious.

I write Access VBA all day long.. and i've been burnt by this a couple
of times these past 10 years lol

CTRL+Z is undo in the VBA IDE.

CTRL+Y -- which should be REDO-- it DELETES A LINE OF CODE

anyone else ever notice this?
 
6

'69 Camaro

Hi, Aaron.
why does CTRL+Y delete a line of code?

<CTRL><Y> facilitates moving a line of code without having to highlight the
entire line, such as is needed when using <CTRL><X>. It's a two-step
process.

Place the cursor anywhere along a line of code. Press <CTRL><Y> to "cut"
the entire line of code. Place the cursor somewhere else in the code
window. Press <CTRL><V> to "paste" the line of code at the new destination.

If one accidentally cuts a line of code with <CTRL><Y>, then merely pressing
<CTRL><V> while the cursor is on the same line will make the code reappear.
(<CTRL><Z> will make the code reappear, too, even when the cursor has been
moved elsewhere in the code window.) The code isn't lost. It's just been
cut and copied to the Windows clipboard for easy pasting elsewhere.
CTRL+Y -- which should be REDO-- it DELETES A LINE OF CODE

Perhaps in other editors. The VB Editor has its own shortcut keys. To redo
an action said:
I write Access VBA all day long.. and i've been burnt by this a couple
of times these past 10 years lol

Perhaps if you sought training in Access, you'd know how to use the tools
better and have far fewer disasters befall you and your software
applications.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.
 
D

Dirk Goldgar

why does CTRL+Y delete a line of code?

I'm jsut curious.

I write Access VBA all day long.. and i've been burnt by this a couple
of times these past 10 years lol

CTRL+Z is undo in the VBA IDE.

CTRL+Y -- which should be REDO-- it DELETES A LINE OF CODE

anyone else ever notice this?

I've never used it, but it's right there in the VB Editor help file
topic, "Code Window Keyboard Shortcuts". There's no special reason its
function should be "Redo", any more than there is that it should be "Cut
current line". Someone on the development team decided that "cut
current line" would be a useful operation to have at your fingertips,
and assigned it to that keystroke combination; probably thinking that
Ctrl+Y made sense, as "like Ctrl+X, but different".
 
S

Someone

Ctrl+Y is used to cut a line of code to the clipboard since DOS days, so if
it was something else, a lot of people would have demanded it. If you want
to modify it, look for an Add-in that lets you do that. You can make your
own Add-in in VB6. Another easy way is to install MZTools add-in and use its
shortcut options. You can't configure Ctrl+Y to be Redo, but you can change
it to something else that doesn't cut your line of code.

http://www.mztools.com
 
A

aaron.kempf

no. these Microsoft PMs are just too fat drunk and lazy to make these
things consistent.

i mean-- CTRL+Y is REDO.
it should be REDO **EVERYWHERE**
 
Joined
Dec 14, 2011
Messages
4
Reaction score
2
Just saying. This is still a thing. CTRL+Y is a windows standard for redo. this should be changed, or at least an option. I've never once wondered about needing a faster way to cut and paste. But redo... now that's a nugget of gold right there. While we're at it, can we get mouse scroll wheel support in the VBA SQL screens?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top