Type: Posts; User: westconn1
Search took 0.26 seconds.
are you sure there is an activeworkbook at this point?
i tested in VBA
Set xl = CreateObject("excel.application")
Set wb = xl.activeworkbook ' no error here, but wb is still nothing
it will only work, in any version, if it exists already
i would assume that the idea would have been to define the middle cell of the grid a named range of rngmiddle
presumably you could check the printer devicename for
i found an example
i tested my previous suggestion, like
set myclip = createobject("Clipbrd.Clipboard")
use your own method to access the clipboard, you...
are you writing the code in outlook or word?
are you trying copy the entire body text?
there are 2 basic methods, open the workbook in excel, visible or not
or use ADO and return a recordset from the workbook
i would have though these would have been invalid filenames, containing /s
you can check the Application.Version in the workbook open event, if > 12 (or whatever) thisworkbook.close false
or msgbox "missing Version references"
but maybe better to remove references to...
you could try copying the selection, then retrieve the text from the clipboard
vba dde tutorial
shell is a reserved word, you can not use it for a variable
normally you would use the single click to like this, double click would open the file directly
i do not understand why you want to use the textbox as you have a filelist box
you are setting the workbook filename when you double click the filelist box, so why not just use the selected file?
i do not see a procedure of that or similar name, or any code to open a workbook at all
there is a module that is not included in the project, with a procedure that shells excel, but does not open...
you could shell out to any other program or .vbs script, or use activex .dll files
i am not sure that is what you are asking though
at what point of the code does the error occur?
is it the path in your datalink file that is incorrect?
you would need to either copy the entire array,
Array2 = Array1
or dimension the 2nd array to the size of the first one before copying all the elements
as this looks like a .net error i will...
what happens with your current code? what needs to change?
try a collection instead, much faster
it is much better to work with a fully qualified range, rather than relying on the selection object
so i would certainly recommend the 2nd example, which is why i asked why selecting
you can try
.Range(.Cells(intDownStart, intAcrossStart), .Cells(intDownStart, intAcross)).Select 'Select the range
end withyour code does not specify that the cells are in the...
for rw = 2 to 30 ' change to suit
set msg = ' this depends on the method to be used to send the emails
msg.body = cells(1, 1) & cells(1, 2) & cells(1, 3) & vbnewline & cells(rw, 1) &...
best to make sure you have the VBA help installed, it is not installed by default when installing office, but is on the media as an option
VBA, at least up to 2010, uses Iif or If, same as VB6
try changing the name of the second variable, or use an array, i have struck this before with similar named variables, but not often
this is obviously VBA, substitute and rept are worksheetfunctions
evaluate is not a worksheetfunction in my version of excel, but may be in later versions, else could be using a reference to msscript
you can try llike
Dim ret As Long
Private Sub Command1_Click()
ret = Shell("notepad.exe", vbNormalFocus)
Private Sub Command2_Click()
why not just find ones that match variable?
Set fnd = thisdocument.range.Find.Execute(myvar, True, True, , , , False)
Anextrow would be a range, but using late binding, object is fine)
xlup should be a constant = -4162, you can use a long variable, but must assign the value to the variable
else you can just use...
i seem to remember a similar thread started by you in 2011
most of your questions should...
assuming you have to put some processed values back into the worksheet, i am not sure that using an array is the best way, have you considered a recordset?
while usedrange should work, it often may give problem, try like
set Anextrow = TSheet.cells(TSheet.rows.count, 1).end(xlup).offset(1)
Anextrow.value = T 'Cost Variable declared elswhere...
you want to print to a text file? or a printer driver specific file .prn?
ps give more detail to the required output, formatted or just data?
no time to try now, but you should be able to set a range = sht.autofilter
this will change to get the full line for each line with time
Dim r As Range
Set r = ActiveDocument.Range
can you use multi columns so mr is in a separate column?
what is the problem?, matchentry should work
you could use conditional formatting to do this
if you want help with vba code, i suggest posting a sample workbook, here, with before and after sheets, zip first
.ShowRevisionsAndComments = not .ShowRevisionsAndComments
.RevisionsView = wdRevisionsViewFinal
Click Here to Expand Forum to Full Width