This code looks up synonyms of words in col A and prints the synonyms in the columns to the right of col A.
Is is possible to change the code to look up definitions as opposed to synonyms?
Thank you in advance for your reply.
Dim wdApp As Word.Application
Public Sub SynonymFind()
'This macro will not run unless you go to
'In VB Editor set Tools > References > Microsoft Word Object 11.0 Object Library
vColumn = Left(Columns(ActiveCell.Column).Address(0, 0), 2 + (ActiveCell.Column < 27))
Set wdApp = New Word.Application
Do While ActiveCell.Row 0 Then
vList = SynonymInfo(Word:=vSyn, LanguageID:=wdEnglishUS).SynonymList(1)
For i = 1 To UBound(vList)
Range(Left(Columns(i + 1).Address(0, 0), 2 + (i + 1 < 27)) & ActiveCell.Row).Value = vList(i)
Next i
End If
NextWord:
ActiveCell.Offset(1, 0).Select
Loop
wdApp.Quit
Columns.EntireColumn.AutoFit
MsgBox ("FINISHED")
Preferably even more, how a Function might be used for more than one purpose.
Hello all,
My company has the bad habit of passing shared excel files down through the generations and they've accumulated hundreds of superfluous defined names that add unnecessary file size and cause stability issues. Is there a way to get rid of them other than deleting them one by one? Also, the defined names all seem to come back as soon as someone pulls a tab into the file from a different file. I've wasted numerous hours deleting the defined names only to see them pop right back as soon as someone else goes in the file. Any way to keep it clean? I've even recreated files that are completely clean only to see them get dirtied up as soon as someone else adds a link or a tab.
Also, we end up with many old links that don't work and won't go away when you delete them.
Any ideas? We have Excel 2002.
Thanks,
Jonathan
Is there a max number of name definitions I can have in a workbook?
Thanks.
Chris
I want to create a style (cell format) and use it whenever i need in the
code. Otherwise bordering a cell for instance needs a lot of lines to code
as "macro recorder" suggested to me. By the way what is the easiest way to
border for sides of a cell? Is it possible to do it with a single line?
-Does the dataype Style helps? I am going to check the internet but your
help could make me faster.
thanks.
Is there such a thing as a dictionary of VBA code functions?
I want to be able to look up the end result and find out what the code is.
For example, I want a sub form to refresh when a combo box is updated, what is the code that I enter for refresh? How does it look.
Currently, I just search here until I find it, but I would like to have a refernce of some sort.
Thanks,
unc2plo
Hi
Very quick question - is it possible on Excel 2010?
I am using named ranges that refer to a sheet that is "veryhidden". the only reference is on a sheet that is protected to the hilt so the only visible reference to the "veryhidden" sheet is in the Names definitions. Is it possible to hide these from view?
Many thanks
Kind regards
I'm using Access2007 and Excel2007.
After I export data from an Access query into an existing Excel spreadsheet, the name definitions that were previously defined in the spreadsheet are no longer valid.
Even though they appear in the Name Manager with the proper reference location the cells in the spreadsheet do not execute the formulas that make reference to the names. If I delete the name and enter it again all the formulas work as expected.
I was previously using Excel 2003 with Access 2000 and this was not a problem. I converted the Excel2003 spreadsheet to an Excel2007 and now I have the problem. If I export to the Excel2003 sheet everything works fine.
Anybody know if this is a bug or am I overlooking something?
Any help or suggestions would be appreciated.
Hi there,
I'm using VBA to alter SQL query definitions in Access - I have the general process worked out but I'm having trouble with date criteria.
Hopefully I can explain this well enough for someone to understand and help me out!
I'm using a number of IF statements in VBA to determine the string for the SQL query definition, with some variables coming from a Form. It works perfectly for the variables which are text but it's doing something a bit odd (and very annoying) with the dates. I'll give you a basic version of my code then explain what it's doing!
Dim qryName As QueryDef
Dim myForm As Form
Dim StartDate As Date
Dim EndDate As Date
Set qryName = dbsCurrent.QueryDefs("qry_Report")
Set myForm = Forms!frm_Report_Criteria
StartDate = myForm![Criteria_Start]
EndDate = myForm![Criteria_End]
qryName.SQL = "SELECT tbl_Main.Client FROM tbl_Main WHERE [S1Date] BETWEEN " & StartDate & " AND " & EndDate & ";"
When I open the query in SQL view it looks correct i.e it has recognised that they are dates and put the '#'s round them e.g. Between #1/1/2008# And #3/31/2008# But the query doesn't return the results, and when I look at the query in design view it looks like this - Between 1/1/2008 And 31/3/2008. However if I go into 'Zoom' or 'Build' and just come straight back out without changing anything it corrects itself with the '#'s and the query runs correctly.
Does anyone have any ideas?? I'm tearing my hair out - it's the last thing stopping me from finishing a project!
Any help greatly appreciated
I'm using Access2007 and Excel2007.
After I export data from an Access query into an existing Excel spreadsheet, the name definitions that were previously defined in the spreadsheet are no longer valid.
Even though they appear in the Name Manager with the proper reference location the cells in the spreadsheet do not execute the formulas that make reference to the names. If I delete the name and enter it again all the formulas work as expected.
I was previously using Excel 2003 with Access 2000 and this was not a problem. I converted the Excel2003 spreadsheet to an Excel2007 and now I have the problem. If I export to the Excel2003 sheet everything works fine.
Anybody know if this is a bug or am I overlooking something?
Any help or suggestions would be appreciated.