-
WSDon_Sadler
AskWoody LoungerNot sure why I never brought closure to this issue. brettnewman is absolutely correct and I must have been unaware of the a action toolbar.
Thanks to all for the help.
-
WSDon_Sadler
AskWoody LoungerYou might consider applying your ‘psychic’ energies to identifying significant number in his life. Most people choose numeric codes based on birth dates, combination of dates (like two children born in 1980 and 1986… they might choose 8086), first or last digits of a social security or personal identity number.
Other than trying nearly a million possibilities or contacting the manufacturer or engaging a locksmith/safe cracker, I think this is the most efficient approach. Just keep track of the numbers you try so you don’t repeat.
-
WSDon_Sadler
AskWoody LoungerMoz, would you mind sharing the macro for doing borders within a range? I have been struggling with something similar and a peek at your code would help.
Thanks
-
WSDon_Sadler
AskWoody LoungerTry a debug line to see what the value of .formula is. In front of the If statement add this line
Debug.print .FormulaThen show your immediate window (Ctrl-G) and run the code. What is the value shown in the immediate window?
Have you also tried the alternate one line code I offered? I thought this would be better for floor layouts since it gives you four directions rather than two.
1) The one line of code works well and I have it as a rotate macro… the other is just a fast toggle when I work with rectangular objects (shapes).
2) I did the debug thing as you suggested and found that the value of .formula was ‘0 deg.’ NOTE the period at the end of deg. So, I changed the macro to include a period after every instance of deg and it works fine now.
3) Many thanks to you for this. Now, if I can figure out how to have a button on the tool bar to which I can assign the macro. I can only get one button that shows a dropdown with all the macros.
-
WSDon_Sadler
AskWoody LoungerDid you select an object on the page before running the code? Your sample code included a specific object to rotate, my effort allowed you to select an object to run the code on.
My problem with the macro not running was due to the macro security setting within Visio. Once I changed that, the macro runs but not as expected.
The macro is as follows:
Code:Sub Toggle_Shape() With ActiveWindow.Selection.Item(1).CellsSRC(visSectionObject, visRowXFormOut, visXFormAngle) If .Formula = "0 deg" Then .Formula = "90 deg" Else .Formula = "0 deg" End If End With End Sub
If my selected shape is at 90 then it will toggle to 0. However, if the shape is 0, it will not go to 90. I reversed to code just for testing to the following
Code:Sub Toggle_Shape() With ActiveWindow.Selection.Item(1).CellsSRC(visSectionObject, visRowXFormOut, visXFormAngle) If .Formula = "90 deg" Then .Formula = "0 deg" Else .Formula = "90 deg" End If End With End Sub
What I find is that the IF statement always resolves to false and the ELSE is executed. In other words, if my selected shape is at 0 then it will toggle to 90. However, if the shape is 90, it will not go to 0.
-
WSDon_Sadler
AskWoody LoungerThanks Andrew but when I put that code in (between the sub & end sub). It does nothing that I can see.
-
WSDon_Sadler
AskWoody LoungerI have a column in a MS Excel spreadsheet, some of whose columns contain numbers and others contain a question mark. Is there a way to count only how many cells contain a number that is great than 0? I don’t wnat the cells containing a question mark to be counted.
If your range is A1:C5 use this formula (replace the range accordingly)
=COUNTIF(A1:C5,”>0″)
-
WSDon_Sadler
AskWoody LoungerGot it. thank you.
-
WSDon_Sadler
AskWoody LoungerAndrew – a question…
In your code you have
If Target.Address = “$N$8” Then
I am curious why the IF since the user has already said he wanted N8 to contain the sheet name. Also, how would VB be able to determine if the Target.Address = “$N$8”?
-
WSDon_Sadler
AskWoody LoungerJust curious… if you did want to make it an add-in, how do you do that? and how would you share the add-in?
-
WSDon_Sadler
AskWoody LoungerWould some kind soul point us the way please as this issue is getting us nowhere fast.
Regards, Bruno Terlingen
Bruno, I used CDex from http://cdexos.sourceforge.net/?q=download and it worked fine. I also came across this that appears to be an even simpler solution although I have not yet tried it… http://www.topbytelabs.com/freestuff/index.php?id=68
If you do try the second one, please report back how it worked.
-
WSDon_Sadler
AskWoody LoungerThanks Sam – I love this and will certainly use it… often.
First off my ‘Greetings’ to everyone here. What an excellent site for windows & related help.
Being a bit of an experienced computer troubleshooter I frequently get questions from friends. A lot of you here no doubt find yourself in the same situation, helping a neighbor or family member with what most often is a simple issue. I often ask if they perhaps took a bit of time & Googled for a solution. Most individuals must find Googling for an answer as something to be avoided at all costs. And what incentive is there to do that when I’m really just as easily a quick email or phone call away!!!
Now I’m a patient person & generally will answer a question as simply as possible. But, if asked something more challenging for which I have no clear answer I will simply say, “Let me Google that for you! I’ll get back to you ASAP via email.” That’s where what follows the sample question comes in.
Sample Question: Hey buddy! How Can I Tell If My Operating System Is 32 Or 64 Bit?
I then head over to: Let Me Google That For You & enter the search question.
The site generates a link for me that I will then copy paste into my reply email.Here is the link provided for the 32/64 bit question: How can I tell if my operating system is 32 or 64 bit? [You, the reader, will probably want to click this link first to see the end result.]
That will usually bring a chuckle to my inquiring friend, who I can now hope next time will make the effort to give Google a shot first & then call me if he/she is unable to find an answer!
Best Wishes To All!
-
WSDon_Sadler
AskWoody Loungerokay, I finally got it. Love it when the light comes on. Thank you.
-
WSDon_Sadler
AskWoody LoungerWhen assigning a range to an object variable, you must use the Set keyword.
Also, the outter-most With construct isn’t used in your code. This comes down to:Code:Sub Resetvalues() ActiveSheet.Unprotect Dim wsh As Worksheet Set wsh = Worksheets("EVENT-Work") Set myRange = Range("B9:B110, H9:H110, O9:O110") For Each rngarea In myRange.Areas For Each rngcell In rngarea With rngcell If .Value vbEmpty Then .Value = "0" End With Next rngcell Next rngarea Application.ScreenUpdating = True ActiveSheet.Protect End Sub
Alternatively you can use the SpecialCells method:
Code:Sub Resetvalues() Dim rngCell As Range ActiveSheet.Unprotect Application.ScreenUpdating = False For Each rngCell In Range("B9:B110, H9:H110, O9:O110") With rngCell If .Value vbEmpty Then .Value = "0" End With Next rngCell Application.ScreenUpdating = True ActiveSheet.Protect End Sub
Where can I learn more about how to use rngCell? The VBA help does not have anything about rngCell.
-
WSDon_Sadler
AskWoody LoungerThank you all for your help. There are, it seems, several ways to do what I needed. I looked in another resource and got yet another answer… see below.
Code:Sub Resetvalues() ActiveSheet.Unprotect Dim wsh As Worksheet Set wsh = Worksheets("EVENT-Work") Set myRange = wsh.Range("B9:B110, H9:H110, O9:O110") For Each cl In myRange If Not IsEmpty(cl.Value) Then cl.Value = "0" Next cl Application.ScreenUpdating = True ActiveSheet.Protect End Sub
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
*Some settings are managed by your organization
by
rlowe44
9 hours, 36 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
11 hours, 50 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
12 hours, 15 minutes ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
21 hours, 15 minutes ago -
AI slop
by
Susan Bradley
20 hours, 26 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
22 hours, 32 minutes ago -
Two blank icons
by
CR2
8 hours, 5 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 7 hours ago -
End of 10
by
Alex5723
1 day, 10 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
8 hours, 1 minute ago -
test post
by
gtd12345
1 day, 16 hours ago -
Privacy and the Real ID
by
Susan Bradley
1 day, 6 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
22 hours, 21 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 20 hours ago -
Upgrading from Win 10
by
WSjcgc50
8 hours, 10 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
11 hours, 44 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 days, 12 hours ago -
The story of Windows Longhorn
by
Cybertooth
1 day, 23 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days, 14 hours ago -
Are manuals extinct?
by
Susan Bradley
7 hours, 47 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
2 days, 23 hours ago -
Network Issue
by
Casey H
2 days, 10 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
3 days, 11 hours ago -
May 2025 Office non-Security updates
by
PKCano
3 days, 11 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
3 days, 13 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days, 14 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 15 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 15 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 days, 23 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
8 hours, 16 minutes 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.