-
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
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
April 2025 Office non-Security updates
by
PKCano
6 hours, 38 minutes ago -
Microsoft wants to hear from you
by
Will Fastie
7 hours, 50 minutes ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
10 hours, 11 minutes ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
15 hours, 42 minutes ago -
Test post
by
Susan Bradley
17 hours, 56 minutes ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
19 hours, 37 minutes ago -
SSD shuts down on its own
by
CWBillow
11 hours, 1 minute ago -
OneDrive File Sharing Changes
by
David Clark
1 day, 3 hours ago -
OneDrive File Sharing Changes
by
David Clark
1 day, 5 hours ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
5 hours, 47 minutes ago -
Today is world backup day
by
Alex5723
21 hours, 21 minutes ago -
Windows .exe on Mint
by
Slowpoke47
1 day, 7 hours ago -
Reviewing your licensing options
by
Susan Bradley
17 hours, 2 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
2 hours, 34 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
10 hours, 21 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
17 hours, 34 minutes ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
1 day, 3 hours ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
1 day, 1 hour ago -
YouTube Ad Blocker Blocker
by
bbearren
1 day, 1 hour ago -
Obscure historical facts about Windows
by
Cybertooth
1 day, 3 hours ago -
Microsoft Backup
by
Linda2019
18 hours, 53 minutes ago -
What is the best notepad++ version for W7?
by
Picky
1 day, 2 hours ago -
What are right steps to move MS 365 Office+OneDrive files from PC to iMac?
by
glnz
2 days, 11 hours ago -
How to move existing MS 365 Office with OneDrive files from PC to new iMac
by
glnz
2 days, 11 hours ago -
How to move MS 365 files (some on OneDrive) from PC to iMac
by
glnz
3 days, 6 hours ago -
Microsoft adding Quick Machine Recovery to Windows 11
by
Alex5723
3 days, 7 hours ago -
Microsoft vs Passwords
by
Alex5723
14 hours, 46 minutes ago -
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
3 days, 10 hours ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
3 days, 11 hours ago -
Two March KB5053606 updates?
by
Adam
3 days, 4 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
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.