-
WSreimer
AskWoody LoungerSam,
I tried the sample macro you posted and it failed. To get it to work on my Excel (97) I had to remark out the last part of the Dim statement (see below).
Dim Rsp ‘As VbMsgBoxResultMaybe you developed under higher level Excel.
It is a handy macro to build on.I just love this site for all the information that is available here.
Chuck
-
WSreimer
AskWoody LoungerUnless I misunderstand the question, the macro below (from Legare Coleman) will do the job.
The worksheet protection does not have to turned on to work.Private Sub Worksheet_Change(ByVal Target As Excel.Range)
‘ Source Woody’s Lounge Author: Legare Coleman
‘ This prevents user from changing the cells without using
‘ protection and locking worksheet.If Intersect(Target, ActiveSheet.Range(“B80:D84”)) Is Nothing Then Exit Sub
Application.EnableEvents = False
MsgBox “You can’t alter this cell.”, vbExclamation + vbOKOnly
Application.Undo
Application.EnableEvents = True
End Sub -
WSreimer
AskWoody LoungerPlease attach file.
Chuck
-
WSreimer
AskWoody LoungerI set it up both ways (nestred IF and INDIRECT). Using the Nested IF, the user can erase the contents of G2 (State) and the drop down list for City (I2) lets user select a blank entry from the drop down list. If you set it up with INDIRECT and erase the contents of G2 (State), the user cannot access the drop down list for City in I2. A small point but may be important to designer.
Chuck -
WSreimer
AskWoody LoungerTony,
In the past I have used macros to print. Create one macro that will print the three sheets and a different macro to print the 6 sheets.
Hope this helps.Chuck
-
WSreimer
AskWoody LoungerLegare,
What is the oleApp (in your macro) for? I tested my macro and it worked without using oleApp.
Just curious…Thanks,
Chuck
-
WSreimer
AskWoody LoungerI use a macro to open a password protected workbook.
Code looks like:
Workbooks.Open FileName:=”METC_MEARSDATAUSERSREIMERCREXCELDelimitTest2.xls”, Password:=”t3″, WriteResPassword:=”t3″
Try it this way.
Good luck,Chuck
-
WSreimer
AskWoody LoungerWhen you save macros in your Personal.xls and then close Excel, you should be asked if you want to save the changes to Personal.xls. Respond yes.
Or you might try saving the Personal.xls as soon as the macros are done being written:
Go to the Visual Basic Editor (press Alt+F11 if it is not running).
The menu at the top will let you save Personal.xls.
If these two methods fail to save the macros in Personal.xls, I would suspect you do not have Excel installed locally on your PC, and there may be problems with rights to the Personal.xls file that is stored on the network.Chuck
-
WSreimer
AskWoody LoungerJuly 25, 2002 at 11:22 am in reply to: File Management or How to use startup parameters (97/2000/XP) #603897You should be able to associate the extension .vzg with Excel. I created a sample file and right-clicked it -then selected Open With, scrolled down to Excel and clicked the box Always use.
Now when you double click a file with that extension, it will start Excel and load the file you double-clicked.
If you need the macros loaded at the same time, just put the macros in your Personal.xls file (it always opens when Excel does).
If I understood your question, this should do it. I am using Excel 97 on an NT system.
Good luck,
Chuck -
WSreimer
AskWoody LoungerJuly 24, 2002 at 7:15 pm in reply to: Losing formatting when copying/pasting a worksheet (Excel XP) #603663I do not have Excel XP.
In Excel 97, I use the Edit / Move or Copy Sheet method. It might work in your version too.
It gets all formatting (including column widths)
From the menu select Edit
Select Move or Copy Sheet
In the dialog box indicate the workbook you want it copied to (or select New)
Be sure you put check mark in box for Create Copy
Click OK button
Then just rename the worksheet tab and erase the old data that you do not want.
Good luck.Chuck
-
WSreimer
AskWoody LoungerBrooke,
Not only fast but accurate! It worked so fast I almost did not realize that it accomplished the task. I thank you.
I just wish it looked more complicated That was embarrasingly simple. (and I spent about an hour on it and kept failing)
I LOVE THIS PLACE!Chuck
-
WSreimer
AskWoody LoungerNot in Excel 97. Color tabs are not provided for.
Chuck
-
WSreimer
AskWoody LoungerSet column A to the desired width and format the cells in column A to alignment/wrap text. Your last entry is very long and using autofit column width will probably not give you a disired result. If you put ‘ in the empty cells in column B you will not be able to read the ends of the longer text entries in column B.
Hope this is of some help,
Chuck
-
WSreimer
AskWoody LoungerAnother option is a macro that counts the unique items in a named range. I am attaching a sample workbook. You can modify the macros to do something based on whether you wish to continue or no. This example is based on a tip by J.G.Hussey, published in “Visual Basic Programmer’s Journal”
Just another option….Chuck
-
WSreimer
AskWoody LoungerCould you attach a sample workbook showing the types of text entries you wish converted?
Chuck
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
3 hours, 46 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
5 hours, 2 minutes ago -
The story of Windows Longhorn
by
Cybertooth
5 hours, 32 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
7 hours, 1 minute ago -
Are manuals extinct?
by
Susan Bradley
24 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
16 hours, 9 minutes ago -
Network Issue
by
Casey H
3 hours, 14 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
1 day, 4 hours ago -
May 2025 Office non-Security updates
by
PKCano
1 day, 4 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 6 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
7 hours, 23 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 8 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 8 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 16 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
8 hours, 28 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
2 days, 3 hours ago -
How much I spent on the Mac mini
by
Will Fastie
1 day, 2 hours ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
6 hours, 29 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 9 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day, 4 hours ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days, 4 hours ago -
Powershell version?
by
CWBillow
2 days, 5 hours ago -
SendTom Toys
by
CWBillow
16 hours, 29 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 9 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
3 days, 1 hour ago -
How can I install Skype on Windows 7?
by
Help
3 days ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 days, 7 hours ago -
We live in a simulation
by
Alex5723
3 days, 16 hours ago -
Netplwiz not working
by
RetiredGeek
3 days, 2 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
4 days, 4 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.