-
WSHenrik Ryberg
AskWoody LoungerThanks John, I’ll give it a go tomorrow. They seem to be something in the right direction.
Suggestion #2 – “Multiple Excel Files…” worked like a charm
(Thanks again Hans / :rolleyes:)
-
WSHenrik Ryberg
AskWoody LoungerThanks for sharing the insights Rory.
Trying to understand my options in O2010 from both the programmatic and the GUI side.
-
WSHenrik Ryberg
AskWoody LoungerSo if I understand your comment and the documentation correctly, I can set up a theme with a set of basic colors and vary those with ao. the .tintandshade property of the .interior object?
Additionally I can also vary any color directly regardless of the theme with the same .tintandshade property of the .interior object?
Hope this makes sense… :huh:
-
WSHenrik Ryberg
AskWoody LoungerSo the .Colors thought is gone and you just apply specific colors at specific instances??
So it’s not really possible to supply a user with a detailed set of “approved” colors without:
1. changing the theme?
2. having only 6 colors available? (urghs!) -
WSHenrik Ryberg
AskWoody Lounger“…so I’m not sure what your question really is”.
Probably because I took it slightly out of context to simplify(Maybe I should have posted in VBA forum)
Actually I’m trying to setup themes 1, 2 and 3 that all has varied colors with a lot of gradients.
In my old VBA code I did this with a toolbar, where the user selected a “color pack” that was then applied to the entire color palette. All done by means of a “For… loop”, that ran through the .Colors property of the ActiveWorkbook (below).
dim iColors as Integer
For iColors = 1 To 56
With ActiveWorkbook
Select Case iColors
Case 1
‘BLACK
.Colors(iColors) = RGB(0, 0, 0)
Case 17, 25, 53
.Colors(iColors) = RGB(0, 65, 120)
Case 22, 30, 52
.Colors(iColors) = RGB(155, 140, 100)
…..In O2010 it seems to me that the .Colors property is no longer working in a meaningful way as the color palette has been changed significantly. So my question is:
How do I implement code that does what my old “For loop” did – and what should it look like??
I’ve tried to record a macro, by creating a theme. But it does not reveal:
1. how the colors are set
2. how I get more than 6 accentsHope this is more clear :confused:
-
WSHenrik Ryberg
AskWoody LoungerYou can create a UserForm which can be done in the VB Editor in Excel.
Thanks for the answer – appreciate it, but I’m already aware of that option.
I was just hoping to achieve more or less the same with the “input box” directly, so that I don’t have to go through the tedious “VB-forms” way.
-
WSHenrik Ryberg
AskWoody LoungerHi Rory,
Why use the subset .ProtectContents in comparison to “just” .Protect – after all .Protect includes .ProtectContents as well?? (fwik)
:confused: -
WSHenrik Ryberg
AskWoody LoungerHi jscher,
Thanks for the tip. Only problem is that this is directly between Excel and Word, so for now there’s no ODBC source involved.
-
WSHenrik Ryberg
AskWoody LoungerHi Rory,
Got you on that – thanks for the tip.
I have decided to take a slightly different approach with a fast double iteration, in which I first find the exact number of matches (the UBOUND – then I Redim in accordance with that before entering the loops.
Code looks like this now
e = 1
eMax = 0For c = 1 To UBound(varGetArrayTransactions, 1)
If sCoName = varGetArrayTransactions(c, 2) Then eMax = eMax + 1
Next c
ReDim arrTransList(eMax, UBound(varGetArrayTransactions, 2))For c = 1 To UBound(varGetArrayTransactions, 1)
If sCoName = varGetArrayTransactions(c, 2) Then
For d = 1 To UBound(varGetArrayTransactions, 2)
arrTransList(e, d) = varGetArrayTransactions(c, d)
Debug.Print “Item (” & e & “,” & d & “): ” & arrTransList(e, d)
Next d
e = e + 1
End If
Next cAppreciate your efforts on this.
-
WSHenrik Ryberg
AskWoody LoungerHi Rory,
Not sure I understand what you mean by “Make arr2 a 1D array of arrays” – got an example?
I tried the transpose bit for starters, but I find it to be a bit messy to work with, when I have many “rows”.
-
WSHenrik Ryberg
AskWoody LoungerHi Rory,
Not quite sure that I understand what you mean by that…
, but I’ll try to explain.
Combo1 – array of 50 rows x 12 columns
– user sees only column 1 and selects an item from there. All other cols contain – in database terms – duplicate values.Combo2 – currencies (fed from named range “dnCurrencies”, 8 items)
– is also found in combo1 array in column 2 (so company X has a corresponding currency, Company Y may have the same CCY)Combo3 – countries (fed from named range “dnCountries”, 20 items)
– is also found in combo1 array in column 3 (so company X has a corresponding country, Company Z may have the same country)So when user changes in Combo1, I get the .listindex returned and can see corresponding values for Currency and Country in columns 2 and 3 respectively.
Then somehow I need to lookup these values in the other combo’s lists and once I’ve found their .listindex value then set it.
So questions are:
– How do I make the latter in the most efficient way?
– Should it be done on a change event?
– Do I need to link the events somehow?What would be the “best practise” approach on this? (if there is one –
)
-
WSHenrik Ryberg
AskWoody LoungerThanks Rory,
Problem is not so much the first addition of the lists. It’s when the value in combo1 changes that I’m in trouble…
Then I need somehow to
1. lookup the related values the array making up combo1 (the hidden columns on the control)
2. match the values from each column in combo1 with a corresponding value somewhere in the list of each of the other combos
3. set the .listindex on combos 2-4 to their corresponding new number…i guess
-
WSHenrik Ryberg
AskWoody LoungerThanks Rory,
Normally I don’t do it either, but problem here is that .activate gives me the current selection – which is the entire range (B6:F19) and not just a single row.
Therefore I decided to try the .select instead. Problem is that it creates another “problem”.
Any idea to how I might be able to get around this??
-
WSHenrik Ryberg
AskWoody LoungerA really informative article.
Thanks for the input RG – I appreciate it.
Despite the clarity of the article, I have an example below where I just don’t understand what’s going on. Maybe you can explain it to me…?
Got a small loop counting down and an array filled with data:
For d = UBound(varGetArrayAll, 1) To 1 Step -1
Range(sRangeAddress).Select
Selection.Rows(d).Select
Debug.Print Selection.Rows(d).Address
next dI want to format a range, say “B6:F19” (named: “sRangeAddress”). Within the range, different rows have different formats. (eg. B6 is title, B7 is heading, B8-B17 is data. B18 a source and B19 a comment. All number of rows can vary)
“Selection.Rows(d).Select” selects the right row.
But “Selection.Rows(d).Address” provides an address offset with d to the range.What I don’t understand is how the same “question” –
Selection.Rows(d) – can result in two different addresses…Any clues??
Bests
PS:
-
WSHenrik Ryberg
AskWoody LoungerFound an answer to my question…
Public Function Array_FillFromSelection()
Dim c
Dim d
Dim varGetArrayAll As VariantvarGetArrayAll = ActiveCell.CurrentRegion.Value
For c = 1 To UBound(varGetArrayAll)
For d = 1 To UBound(varGetArrayAll, 2)
Debug.Print varGetArrayAll(c, d)
Next d
Next c
End Function
![]() |
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
-
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
2 hours, 19 minutes ago -
Office apps read-only for family members
by
b
4 hours, 55 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
1 hour, 47 minutes ago -
24H2??
by
CWBillow
10 hours, 39 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
13 hours, 40 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
6 hours, 54 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
1 hour, 43 minutes ago -
two pages side by side land scape
by
marc
2 days, 2 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
2 days, 4 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
1 day, 7 hours ago -
Security Essentials or Defender?
by
MalcolmP
1 day, 10 hours ago -
April 2025 updates out
by
Susan Bradley
5 hours, 25 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
1 day, 3 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
17 hours, 52 minutes ago -
Creating an Index in Word 365
by
CWBillow
1 day, 20 hours ago -
Coming at Word 365 and Table of Contents
by
CWBillow
8 hours, 27 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
2 days, 23 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
3 days, 3 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
3 days, 5 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
3 days, 3 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
2 days, 20 hours ago -
I installed Windows 11 24H2
by
Will Fastie
1 day, 2 hours ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
3 days, 8 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
1 hour, 52 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
3 days, 16 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
3 days, 1 hour ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
3 days, 1 hour ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
4 days, 9 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
4 days, 18 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
17 hours, 52 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.