Help Needed for Word Search Creation - Challenging

Monres

New Member
Joined
Jun 18, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Good afternoon excel wizards,

I am struggling here after not having used VBA in so long. I am working off of Rijnsent's amazing work that generates a crossword puzzle using excel and macros:

I would like to expand on this and find a way to incorporate lines drawn through the words used. I found this:

I just don't know enough to know where to get the reference cells from and use them to draw the lines. Any help with this would be huge.

Thank you all!
~Monres
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
4,295
The first link to the word generator resulted in an error message here that I am unable to resolve.

However, you can use the following macro to draw a line through the term searched for :

VBA Code:
Option Explicit

Sub findWord()
    Dim ws As Worksheet
    Dim findAword As Range
    Dim wordToFind As String
    
    Set ws = Sheet1
    
    wordToFind = InputBox("What word do you want to find?")
    
    If wordToFind = "" Then
        Exit Sub
    Else
        Set findAword = ws.Cells.Find(What:=wordToFind, LookAt:=xlPart, MatchCase:=False)
    End If
    
    If Not findAword Is Nothing Then
       findAword.Select
       ActiveCell.Font.Strikethrough = True
       Range("A1").Select
    Else
        MsgBox "Sorry, " & wordToFind & " was not found."
    End If
    
End Sub
 

Monres

New Member
Joined
Jun 18, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Apologies, I should have been a bit more descriptive. So far the crossword puzzle generator gives me something like this:
1624072272883.png


I would like to find a way to draw a shape (line) from one end of the word to the other so it looks like this (with lines for every word of course):
1624072691788.png


I'm not sure why you can't access the first link, it works for me, apologies. I know that somewhere in the VBA code for this generator, I need to incorporate the code for drawing the lines, but I just can't figure it out on my own. I hope this is a bit more of a description of what I'm looking for. Thank you for your quick reply!
 

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
4,295
He is running Excel 365. Lots different from my 2007 version.

Yes, the macro I provided will not draw diagonal. Sorry.
 

Monres

New Member
Joined
Jun 18, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
And by crossword puzzle I mean word search puzzle. Sorry I have been staring at this for so long.
 

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
4,295
No problem. I am certain some one else will be able to assist. Lots of good folks on here.
 

Forum statistics

Threads
1,147,475
Messages
5,741,347
Members
423,656
Latest member
Medrok2021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top