# Search:

Type: Posts; User: MartinLiss

Page 1 of 13 1

1. ## Thread: Excel: Create ranges for date and blank cells

by MartinLiss
Replies
1
Views
139

### Excel: Create ranges for date and blank cells

In column 'A' I have data that looks like this starting in row 3. The number of dates and blanks between the dates are variable. I'd like to do it without stepping through every row. ...
2. ## Thread: Determine total duration in hours, minutes and seconds

by MartinLiss
Replies
3
Views
339

### Re: Determine total duration in hours, minutes and seconds

Thank you for your suggestions, but the devil is in the details; if, say, I have the total of seconds in all the rows, how can I correctly format them the way I show above?
3. ## Thread: Determine total duration in hours, minutes and seconds

by MartinLiss
Replies
3
Views
339

### Determine total duration in hours, minutes and seconds

I have a worksheet where there are From and To times like 4:37:04 PM and 4:39:20 PM in several rows. The times are based on Now() with a NumberFormat of "h:mm:ss am/pm". The To time is triggered by a...
4. ## Thread: [RESOLVED] Find picture files on my PC

by MartinLiss
Replies
3
Views
399

### Re: Find picture files on my PC

I believe I found what I need using Application.FileDialog(msoFileDialogFilePicker).
5. ## Thread: [RESOLVED] Find picture files on my PC

by MartinLiss
Replies
3
Views
399

### [RESOLVED] Find picture files on my PC

It's been so long since I've had a need to do this that I've forgotten how, but using Dir or FSO how do I find picture files in a particular folder on my PC?
6. ## Thread: [RESOLVED] Need help getting diagonal values from a matrix using VBA

by MartinLiss
Replies
8
Views
520

### Re: Need help getting diagonal values from a matrix using VBA

I apologize; I never got any notifications for this question. In the meantime I figured it out by just using a few semi-hardcoded lines. I needed to do it for both AM and PM values since my picture...
7. ## Thread: [RESOLVED] Need help getting diagonal values from a matrix using VBA

by MartinLiss
Replies
8
Views
520

### [RESOLVED] Need help getting diagonal values from a matrix using VBA

I have a matrix that looks like this.
186002

What I need to do is to examine the values in columns L to O so that the results are what is in column AV. The black lines show where the data comes...
8. ## Thread: [RESOLVED] Strange Copy Problem

by MartinLiss
Replies
0
Views
449

### [RESOLVED] Strange Copy Problem

I have two worksheets where cell A3 in both sheets are dates formatted as d-mmm-yy, but when I copy A3 from one sheet where it shows up as 1-Aug-22 to the other sheet it shows up as 44774 which I...

by MartinLiss
Replies
4
Views
656

### Re: Grid-like Userform

Thanks. I saw Elroy's code but I wasn't sure that it would do what I wanted so I just added 80(!) command buttons with one-line click events that call a routine that does what I want based on the...

by MartinLiss
Replies
4
Views
656

### Grid-like Userform

185730
I'm looking for a userform like the above. The color isn't important, but two things are:
1) Some UI effect that indicates that one of the numbers has been clicked, and
2) A way to tell,...
11. ## Thread: [RESOLVED] Copying Conditional Formatting Details

by MartinLiss
Replies
2
Views
414

### Re: [RESOLVED] Copying Conditional Formatting Details

In the past I created a complex named range via code and I wondered how I did it because I needed to do it again. I solved it when I realized that all I needed to do was to record a macro while...
12. ## Thread: [RESOLVED] Copying Conditional Formatting Details

by MartinLiss
Replies
2
Views
414

Self-solved
13. ## Thread: [RESOLVED] Excel Conditional Formatting Problem

by MartinLiss
Replies
3
Views
469

### Re: Excel Conditional Formatting Problem

Nevermind, I figured it out. Thanks again.
14. ## Thread: [RESOLVED] Excel Conditional Formatting Problem

by MartinLiss
Replies
3
Views
469

### Re: Excel Conditional Formatting Problem

Thanks. I don't know what I'm doing wrong but after I enter \$X\$2 for the cell value Excel puts single quotes around it.

185695
15. ## Thread: [RESOLVED] Excel Conditional Formatting Problem

by MartinLiss
Replies
3
Views
469

### [RESOLVED] Excel Conditional Formatting Problem

I have this rule
185691

and I expected only cell X8 to be blue but this is the result. What am I doing wrong?
185692

by MartinLiss
Replies
16
Views
681

### Re: Ancient History

Yes, lol.

by MartinLiss
Replies
16
Views
681

### Ancient History

When I'm looking for answers to programming problems that I can't solve on my own, one of the places where I go for solutions is VBForums. Well I came here today looking for a solution and I found it...
18. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

Thanks.
19. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

### Re: Step through lines in an ActiveX multi-line textbox

Here's my current code but it doesn't work properly. After I manually select the first line in the textbox and then press the down-arrow, the selection goes to the 2nd character of the 4th(!) line...
20. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

### Re: Step through lines in an ActiveX multi-line textbox

I'm sorry but I made a mistake in my original question; the code is in the txtHits_KeyDown event.

Good point but how do I do that?
21. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

### Re: Step through lines in an ActiveX multi-line textbox

Thanks, but the first one is vb.Net and I need to use VBA and it looks like the second one is not for an ActiveX textbox.
22. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

### Re: Step through lines in an ActiveX multi-line textbox

When using the down arrow in the textbox's MouseDown event this steps through the lines but doesn't highlight them. txtHits is the name of the textbox.

Dim strLines() As String
Select Case...
23. ## Thread: [RESOLVED] Step through lines in an ActiveX multi-line textbox

by MartinLiss
Replies
10
Views
867

### [RESOLVED] Step through lines in an ActiveX multi-line textbox

I have an ActiveX multi-line textbox in a userform. The lines of the textbox are separated by vbCr and are not all the same width.

Using the keyboard up and down arrows I'd like to select and...
24. ## Thread: [RESOLVED] Counting and finding years

by MartinLiss
Replies
5
Views
667

### Re: Counting and finding years

Thanks for your suggestions but I've decided to keep doing it inelegantly like this which both gives me the count of months and the ending address of the first month.

For lngRow = 3 To...
25. ## Thread: [RESOLVED] Counting and finding years

by MartinLiss
Replies
5
Views
667

### Re: Counting and finding years

It is a part of an archiving process. Over time, without this, the main worksheets could have a lot of months added to it and the archiving process limits the number of months on the main sheet by...
26. ## Thread: [RESOLVED] Counting and finding years

by MartinLiss
Replies
5
Views
667

### [RESOLVED] Counting and finding years

I have a worksheet which contains 4 rows of data for each day of several months. Dates like 8/1/2022 are displayed in d-mmm-yy format like 1-Aug-22. I need to 1) determine how many months of data...

by MartinLiss
Replies
2
Views
588

### Re: Permutations?

Thanks, but I found my own relatively simple solution. strRangeText is the comma delimited string and strHits is an array.

Dim intStart As Integer
Dim intNext As...

by MartinLiss
Replies
2
Views
588

### [RESOLVED] Permutations?

I get confused between permutations and combinations, but anyhow I have ten columns, some of which may be blank while the rest contain one or two-digit numbers. Let's assume that the first row...

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

Yes it does work. Sometimes I amazed how dumb I can be.

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

I bet it only works if the workbook only has one userform, or, if there's more than one userform, it shows the one that Excel determines is the first one.

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

Thanks. It sort of works. In my workbook I have several userforms and in the DisplayUserForm sub I changed date_Form to the name of the userform I wanted to position and I changed Activecell to the...

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

Thanks but I tried that already and couldn't get the userform to even come close to where I wanted it. Here is the code I used

Sub Marty()
Dim PS As Positions
Range("H10").Select
...

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

Thanks, Chip has some remarkable code on his site but I don't see how the link helps me to align the top of my userform with the top of a cell. In my question I simplified it a bit in that I also...

by MartinLiss
Replies
11
Views
1,052

### Re: PointsToScreenPixelsX

Thanks but I've seen most of them and either they don't work or they don't apply.

by MartinLiss
Replies
11
Views
1,052

### [RESOLVED] PointsToScreenPixelsX

I assume that PointsToScreenPixelsX comes into play if I want to align the top of my userform with the top of a cell, but what is the statement that does that? Would it be affected by either the...
36. ## Thread: [RESOLVED] Count of unique values in a collection

by MartinLiss
Replies
3
Views
559

### Re: Count of unique values in a collection

Found an easy solution using a worksheet, =Unique and =CountA. No collection or Dictionary needed.
37. ## Thread: [RESOLVED] Count of unique values in a collection

by MartinLiss
Replies
3
Views
559

### Re: Count of unique values in a collection

Can you supply sample code? I haven't had any experience with dictionaries.
38. ## Thread: [RESOLVED] Count of unique values in a collection

by MartinLiss
Replies
3
Views
559

### [RESOLVED] Count of unique values in a collection

I have a sorted collection of 4-digit numbers and many of the numbers are duplicated. I'm looking for a quick way to get a count of each unique value. For example if 1234 occurs 3 times in the...

by MartinLiss
Replies
12
Views
944

An article I read suggested that the dll could be saved as an exe which I've done. How to I register it in 64 bit?

by MartinLiss
Replies
12
Views
944