ROn... wrote:
Does someone know why this doesn't work in VBA (Excel 97):
lTemp = Application.SheetsInNewWorkbook
Application.SheetsInNewWorkbook = 1
Set wbTarget = Workbooks.Add
Application.SheetsInNewWorkbook = lTemp
if you have an activeX control, it's probably this problem:
XL97: Error Changing Application Object from ActiveX Control
http://support.microsoft.com/default...b;en-us;177527
try to set TakeFocusOnClick property to false or "ActiveCell.Activate".
--
HTH,
okaizawa