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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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
 
Upvote 0
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!
 
Upvote 0
He is running Excel 365. Lots different from my 2007 version.

Yes, the macro I provided will not draw diagonal. Sorry.
 
Upvote 0
And by crossword puzzle I mean word search puzzle. Sorry I have been staring at this for so long.
 
Upvote 0
No problem. I am certain some one else will be able to assist. Lots of good folks on here.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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
Back
Top