#1   Report Post  
carrera
 
Posts: n/a
Default Recording a marcro

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?
  #2   Report Post  
Neil
 
Posts: n/a
Default

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?

  #3   Report Post  
carrera
 
Posts: n/a
Default

oh - I see why it wouldn't work.

however.... You kinda lost me on how to fix it....
do I go into VBA editor, create a new module, type in what you suggested,
close the window, go back to the spreadsheet and start recording again?
Obviously not, since when I tried it, it didn't work.
Then somehow, just trying to figure what I should do, I ended up messing
some stuff up.
Can you please walk me through the whole process, step by step?

Also, if you can't remember what shortcut key you assigned to a macro, how
can you find out?

"Neil" wrote:

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?

  #4   Report Post  
Neil
 
Posts: n/a
Default

Okay, It sounds like you're a little unfamiliar with the whole VBA editor
thing so I'll try to explain this in the easiest possible fashion, although I
will have to make the assumption that you wish to do nothing else with your
macro other than unlock your sheet.

1. Start recording a new macro.

2. Select a Cell (A1?) and type some text in, and press enter to go to
another cell

3. Stop recording your macro.

4. Go into the VBA editor, and click on the modules icon, and find the macro
you just recorded. it will look like the one below

Range("A1").Select
ActiveCell.FormulaR1C1 = "hello"
Range("A2").Select

5. Delete all three of these lines, and replace them with the line below,
changing the phrase MyPassword for your real password

ActiveSheet.Unprotect Password:="MyPassword"

6. Save your workbook and it's all done, now whenever you run that macro you
will unprotect your sheet.

If you wish to do things before or after this command, I would suggest that
as you are unsure about what to do in the VBA editor, you record some macros
for the various things you want to do, and using the VBA editor copy and
paste the code from those macros into your main macro, thus building it up.
(This is also a very good way to see how VBA works and get a feel for the
code)

I have the begginings of a VBA tutorial on my website if thats of any help.

Unfortunately I don't currently know the answer to your last question, but
I'll research it and let you know.

If you want any other specific help, and don't wan tto post here, the
contact me thorught the site and I'll try to help.

Neil
www.nwarwick.co.uk


"carrera" wrote:

oh - I see why it wouldn't work.

however.... You kinda lost me on how to fix it....
do I go into VBA editor, create a new module, type in what you suggested,
close the window, go back to the spreadsheet and start recording again?
Obviously not, since when I tried it, it didn't work.
Then somehow, just trying to figure what I should do, I ended up messing
some stuff up.
Can you please walk me through the whole process, step by step?

Also, if you can't remember what shortcut key you assigned to a macro, how
can you find out?

"Neil" wrote:

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?

  #5   Report Post  
carrera
 
Posts: n/a
Default

Well thanks Neil - that worked great. I'll check out your website when I get
a chance.

I go through spates where I have to write new spreadsheets and let something
new about macros. Frank Kabel of course had always been such a great help. I
miss him.

I'll tell you what one of the problems with my understanding VBA as quickly
as I'd like is the terminology. When I've looked on help sites like this or
in excel help it seems the assumption is made that the terms are understood
already.
For instance - I'm not clear what a module is, why do I create on and where
it should go, and is there a different module for each marcro, why all of a
sudden it seems I have 4 empty ones sitting there. etc.
Also, copying and pasting macros, when I've tried that it seems hit or miss
if I'm doing it correctly. I feel like I'm following the directions to the
letter.
It's like I'm speaking a kinda familiar language but I'm getting the nouns,
verbs & adjetives mixed up.
Oh - I've been on sites that start to explain about macros, what they do and
all, but all of a sudden, when VBA comes up, it's like you leap ahead and are
dropped a mile down the road, and you're struggling because you missed what
happened in that first mile. Like a vital piece is missing.
Thanks for listening - I will look at your site, and if you can recommend
any other to those of us out there who are actually very intelligent, but
just not "getting it", you'd be doing a service to mankind.
Thanks again

"Neil" wrote:

Okay, It sounds like you're a little unfamiliar with the whole VBA editor
thing so I'll try to explain this in the easiest possible fashion, although I
will have to make the assumption that you wish to do nothing else with your
macro other than unlock your sheet.

1. Start recording a new macro.

2. Select a Cell (A1?) and type some text in, and press enter to go to
another cell

3. Stop recording your macro.

4. Go into the VBA editor, and click on the modules icon, and find the macro
you just recorded. it will look like the one below

Range("A1").Select
ActiveCell.FormulaR1C1 = "hello"
Range("A2").Select

5. Delete all three of these lines, and replace them with the line below,
changing the phrase MyPassword for your real password

ActiveSheet.Unprotect Password:="MyPassword"

6. Save your workbook and it's all done, now whenever you run that macro you
will unprotect your sheet.

If you wish to do things before or after this command, I would suggest that
as you are unsure about what to do in the VBA editor, you record some macros
for the various things you want to do, and using the VBA editor copy and
paste the code from those macros into your main macro, thus building it up.
(This is also a very good way to see how VBA works and get a feel for the
code)

I have the begginings of a VBA tutorial on my website if thats of any help.

Unfortunately I don't currently know the answer to your last question, but
I'll research it and let you know.

If you want any other specific help, and don't wan tto post here, the
contact me thorught the site and I'll try to help.

Neil
www.nwarwick.co.uk


"carrera" wrote:

oh - I see why it wouldn't work.

however.... You kinda lost me on how to fix it....
do I go into VBA editor, create a new module, type in what you suggested,
close the window, go back to the spreadsheet and start recording again?
Obviously not, since when I tried it, it didn't work.
Then somehow, just trying to figure what I should do, I ended up messing
some stuff up.
Can you please walk me through the whole process, step by step?

Also, if you can't remember what shortcut key you assigned to a macro, how
can you find out?

"Neil" wrote:

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?



  #6   Report Post  
Neil
 
Posts: n/a
Default

I've been thinkning about some ideas for articles for my website, so I'll
have a look at the questions you pose and see if I can incorporate them into
the VBA tutorial.

If you're a beginner with VBA then I would suggest the 'Dummies guide to
VBA' it starts at first principles, and really got em going with Excel
programming.

Neil

"carrera" wrote:

Well thanks Neil - that worked great. I'll check out your website when I get
a chance.

I go through spates where I have to write new spreadsheets and let something
new about macros. Frank Kabel of course had always been such a great help. I
miss him.

I'll tell you what one of the problems with my understanding VBA as quickly
as I'd like is the terminology. When I've looked on help sites like this or
in excel help it seems the assumption is made that the terms are understood
already.
For instance - I'm not clear what a module is, why do I create on and where
it should go, and is there a different module for each marcro, why all of a
sudden it seems I have 4 empty ones sitting there. etc.
Also, copying and pasting macros, when I've tried that it seems hit or miss
if I'm doing it correctly. I feel like I'm following the directions to the
letter.
It's like I'm speaking a kinda familiar language but I'm getting the nouns,
verbs & adjetives mixed up.
Oh - I've been on sites that start to explain about macros, what they do and
all, but all of a sudden, when VBA comes up, it's like you leap ahead and are
dropped a mile down the road, and you're struggling because you missed what
happened in that first mile. Like a vital piece is missing.
Thanks for listening - I will look at your site, and if you can recommend
any other to those of us out there who are actually very intelligent, but
just not "getting it", you'd be doing a service to mankind.
Thanks again

"Neil" wrote:

Okay, It sounds like you're a little unfamiliar with the whole VBA editor
thing so I'll try to explain this in the easiest possible fashion, although I
will have to make the assumption that you wish to do nothing else with your
macro other than unlock your sheet.

1. Start recording a new macro.

2. Select a Cell (A1?) and type some text in, and press enter to go to
another cell

3. Stop recording your macro.

4. Go into the VBA editor, and click on the modules icon, and find the macro
you just recorded. it will look like the one below

Range("A1").Select
ActiveCell.FormulaR1C1 = "hello"
Range("A2").Select

5. Delete all three of these lines, and replace them with the line below,
changing the phrase MyPassword for your real password

ActiveSheet.Unprotect Password:="MyPassword"

6. Save your workbook and it's all done, now whenever you run that macro you
will unprotect your sheet.

If you wish to do things before or after this command, I would suggest that
as you are unsure about what to do in the VBA editor, you record some macros
for the various things you want to do, and using the VBA editor copy and
paste the code from those macros into your main macro, thus building it up.
(This is also a very good way to see how VBA works and get a feel for the
code)

I have the begginings of a VBA tutorial on my website if thats of any help.

Unfortunately I don't currently know the answer to your last question, but
I'll research it and let you know.

If you want any other specific help, and don't wan tto post here, the
contact me thorught the site and I'll try to help.

Neil
www.nwarwick.co.uk


"carrera" wrote:

oh - I see why it wouldn't work.

however.... You kinda lost me on how to fix it....
do I go into VBA editor, create a new module, type in what you suggested,
close the window, go back to the spreadsheet and start recording again?
Obviously not, since when I tried it, it didn't work.
Then somehow, just trying to figure what I should do, I ended up messing
some stuff up.
Can you please walk me through the whole process, step by step?

Also, if you can't remember what shortcut key you assigned to a macro, how
can you find out?

"Neil" wrote:

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?

  #7   Report Post  
carrera
 
Posts: n/a
Default

Well Thanks Neil - I will certainly check that out!

When teaching - what might be so obvious as to not even mention to the
student, might just be what's holding them back.

"Neil" wrote:

I've been thinkning about some ideas for articles for my website, so I'll
have a look at the questions you pose and see if I can incorporate them into
the VBA tutorial.

If you're a beginner with VBA then I would suggest the 'Dummies guide to
VBA' it starts at first principles, and really got em going with Excel
programming.

Neil

"carrera" wrote:

Well thanks Neil - that worked great. I'll check out your website when I get
a chance.

I go through spates where I have to write new spreadsheets and let something
new about macros. Frank Kabel of course had always been such a great help. I
miss him.

I'll tell you what one of the problems with my understanding VBA as quickly
as I'd like is the terminology. When I've looked on help sites like this or
in excel help it seems the assumption is made that the terms are understood
already.
For instance - I'm not clear what a module is, why do I create on and where
it should go, and is there a different module for each marcro, why all of a
sudden it seems I have 4 empty ones sitting there. etc.
Also, copying and pasting macros, when I've tried that it seems hit or miss
if I'm doing it correctly. I feel like I'm following the directions to the
letter.
It's like I'm speaking a kinda familiar language but I'm getting the nouns,
verbs & adjetives mixed up.
Oh - I've been on sites that start to explain about macros, what they do and
all, but all of a sudden, when VBA comes up, it's like you leap ahead and are
dropped a mile down the road, and you're struggling because you missed what
happened in that first mile. Like a vital piece is missing.
Thanks for listening - I will look at your site, and if you can recommend
any other to those of us out there who are actually very intelligent, but
just not "getting it", you'd be doing a service to mankind.
Thanks again

"Neil" wrote:

Okay, It sounds like you're a little unfamiliar with the whole VBA editor
thing so I'll try to explain this in the easiest possible fashion, although I
will have to make the assumption that you wish to do nothing else with your
macro other than unlock your sheet.

1. Start recording a new macro.

2. Select a Cell (A1?) and type some text in, and press enter to go to
another cell

3. Stop recording your macro.

4. Go into the VBA editor, and click on the modules icon, and find the macro
you just recorded. it will look like the one below

Range("A1").Select
ActiveCell.FormulaR1C1 = "hello"
Range("A2").Select

5. Delete all three of these lines, and replace them with the line below,
changing the phrase MyPassword for your real password

ActiveSheet.Unprotect Password:="MyPassword"

6. Save your workbook and it's all done, now whenever you run that macro you
will unprotect your sheet.

If you wish to do things before or after this command, I would suggest that
as you are unsure about what to do in the VBA editor, you record some macros
for the various things you want to do, and using the VBA editor copy and
paste the code from those macros into your main macro, thus building it up.
(This is also a very good way to see how VBA works and get a feel for the
code)

I have the begginings of a VBA tutorial on my website if thats of any help.

Unfortunately I don't currently know the answer to your last question, but
I'll research it and let you know.

If you want any other specific help, and don't wan tto post here, the
contact me thorught the site and I'll try to help.

Neil
www.nwarwick.co.uk


"carrera" wrote:

oh - I see why it wouldn't work.

however.... You kinda lost me on how to fix it....
do I go into VBA editor, create a new module, type in what you suggested,
close the window, go back to the spreadsheet and start recording again?
Obviously not, since when I tried it, it didn't work.
Then somehow, just trying to figure what I should do, I ended up messing
some stuff up.
Can you please walk me through the whole process, step by step?

Also, if you can't remember what shortcut key you assigned to a macro, how
can you find out?

"Neil" wrote:

This happens because the macro recorder doesn't record the input into the
dialog box that asks you for the pasword, so it halts waiting for the password

To get around this you will need to hardcode the unprotection statement into
your macro directly using the VBA editor, using a line something like:

ActiveSheet.Unprotect Password:="MyPassword"

In answer to the second question - Yes

HTH

Neil
www.nwarwick.co.uk
"carrera" wrote:

Hi This is just a really simple one, to unprotect a worksheet. Having a
problem.

I'm going into Macros - Record - I select to save to Personal - choose as a
shortcut ctrl u (for unprotect) - THEN - I go through the process of
unprotecting the sheet, (even then click on a cell, just to add a final step)
Then I go into Stop Recording.

Well, when I click on the next sheet and hit ctrl u - I get the unprotect
sheet window, that's as far as it goes. What am I doing wrong? (I go back in
after this failure and delte the macro from Personal - to clear it out)
ALSO - A SECOND QUESTION: When I save a macro to the Personal book, does
that mean that the shortcut chosen will work with any workbook I open?

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
Are there any templates for vehicle maintence recording? Bruce S Excel Discussion (Misc queries) 1 March 29th 05 01:31 AM
Macro Recording Sandi Rush Excel Discussion (Misc queries) 2 March 12th 05 02:01 AM
Recording a macro ... Marss Excel Discussion (Misc queries) 3 February 17th 05 07:26 PM
what is the keys to stop recording, i cant press it when making a. Lante Excel Discussion (Misc queries) 1 January 3rd 05 09:15 PM
I am looking for a template for recording rental income and expen. cetmanhd Excel Discussion (Misc queries) 1 December 3rd 04 06:32 AM


All times are GMT +1. The time now is 07:50 AM.

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"