Type: Posts; User: westconn1
Search took 0.29 seconds.
you are testing if a string = true, which it does not, and is not of a type to match a boolean
try more like
rs.find "client_name = '" & txt_client.text & "'"
if not rs.eof then msgbox "client...
then you would need separate queries
you can avoid using the commandtext like
Sql = "select max(f1) from [sheet1$]"
rs.Open Sql, cn, adOpenStatic, adLockReadOnly
Sql = "select * from[sheet5$]...
are you sure it is the first file, not the last
on testing (xl2000) as far as i can tell color will always also return the colorindex (1 for black, 3 for red etc)
mixed colors return null, linefeeds also return colorindex even though not visible...
while in debug
in vb6 /vba, hold mousepointer over in IDE, probably will still work for you
else in code msgbox xlToRight
or in the immediate window ?xlToRight
or any other of the constants
check if the xlconstants contain values when the code runs
c.resize adjusts the size of the range
c.end(xldown)row, finds the next cell below with no data or some data, opposite to starting point
subtract c.row to give number of rows in range to copy
it can happen here if the date is a string variable, but i tested your code, works correctly on today's date
Dim mydate As Date
mydate = Range("d16")
Range("b16") = mydate...
the error was occurring on the row where the table header was the current row, need to offset down 1 row
i did not allow for table headers, as i did not know they were there
Dim c As Range, sht...
with bryce's code, try
ws.Range("a2").Value = DateValue(dt)
ws.range("a2").value = date
i tested the code i posted, it an without error and pasted the data as required
the error you get must apply to the line above or below the line you have quoted
post your amended code in full...
.resize adjusts the size of the range from a single cell, by how ever many rows and columns, it works similarly to .offset, if you want to use an offset to the starting range, must offset before...
you can try like
Dim c As Range, sht As Worksheet
Set sht = ActiveSheet
Set c = sht.Range("a7")
c.Resize(c.End(xlDown).Row - c.Row, c.End(xlToRight).Column).Copy sht.Range("d7")
Set c =...
try removing the new keyword
without seeing the code in context, only a guess
ADO can do some really good data manipulation, with select queries, even when the workbook is open
is that the path to your files?
did you test this to see if it works?
you can open a recordset read /write and save updates
did you try
myaction1.CopyLike = olReplyAll
did you try restart excel? windows?
i made a similar test, works correctly for me
where test existed under inbox
Set inb = GetNamespace("mapi").GetDefaultFolder(olFolderInbox)
Set nw = inb.Folders("test").Folders.Add("mytest")
VBA is an application version (subset) of vb6, with additional application objects
as you have already seen some object that exist in vb6 are not in VBA
VB is windows based
while some VBA works...
resize the excel application window and position behind userform, reset when finished
you could use a formula in some cell to read the closed workbook
but to write, you would need to open the workbook, either in excel (read value and close), or using ADO
either way no need for...
to work with office apps in any meaningful way, you would need some version of office installed
if the version of office at home is different to that at work, or likely to be upgraded regularly, you...
if you are doing this in 2010, it would appear to be a known problem in specificationname see
have you already created the specificationname in access?
this is the workbook sheetchange event, check thisworkbook code pane
cover all sheets in a workbook
i would assume that in all cases that the activesheet would be returned in SH...
what field types are you using for your document properties?
unless you are using some numeric name for your customdocumentproperties, the above will not work, assuming your field indexes are in...
i would assume that if you want to disable copy item on menu, you would probably also want to disable the standard toolbar button as well
i only have excel 2000 on my computer, excel 2013 on a...
i tested on 2013, index of in-built menus is 37, i found there to be 3 edit menus within the built-in menus
test code worked correctly, but i am unsure if any menus are used (displayed) in this...
this is not a valid file name, file names can not contain wildcard characters, if you want to work with all files in a folder named
G:\Finance, Performance & Business Planning\Management...
you can use filesystemobject
if you search application.filesearch alternative you should find several alternatives with code
your workbook opens OK for me, but i can not test the included result, i will look, later, if i have a newer version of excel on any machine,
the value of 90 i used earlier was the index of the...
i tested initially using
For Each cbBar In Application.CommandBars
Debug.Print cbBar.Name, cbBar.Index
Nextwhich gave me the index value of 90 for Built-in Menus
what is the content of m_var when the code runs?
what code are you using now to send the emails?
in outlook, each attachment has to be added to the email
check if the index of 90 is correct for the built-in menus for your version of excel
it worked correctly when i tested
do the names of controls change in different language...
what is the typename of myitems(itemcount) when the error occurs?
perhaps some other type has arrived in your folder that does not match any of the existing criteria, better to change to
Click Here to Expand Forum to Full Width
Survey posted by VBForums.