Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Title: Worksheet sets zoom percent to 4294967295 through VBA

Status
Not open for further replies.

JustKim

Technical User
May 31, 2006
7
GB
Hi everyone, hoping you can help with this one as I am completley baffled! I have automated business object reports, that get exported to excel (through VBA). Now, I ran the code that does this and for some strange reason, some of the exports zoom custom was set to 4294967295. Can anyone think of a reason why this would occur? The code has always ran ok and I have never seen this happen before. Please note that I was testing out my code(which is rather lengthy) for quite a while before I ran the whole script. Im thinking it has something to do with memory, but it just doesnt make sense to me. Also because the Zoom was set to this, this meant that the code could not find any of the cells that hold the exported data.

Thanks
 



Hi,

Excel will accept value between 10 and 400. You get an Application error if you are outside these bounds.

Is is one of the down sides of other applications creating workbooks. I'd rather suggest importing data from another application into Excel.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
So because of the following line of code:

BoRpt.ExportAsExcel (ExportFileLoc & PeriodFolder & ExportName & ExcelFileExtension)

I cannot be certain that my exported document will be exported properly? I never thought that VBA for Excel would act randomly like that. I have absolutley no choice in the matter when it comes to downloading our data. Its has to go through Business Objects.

I still dont understand why it decided to put the zoom up to that number, yet when it exported it the day before, it was fine.
 


"I never thought that VBA for Excel would act randomly like that."

It is NOT VBA.

It is the way that the workbook was created by the Business Object application.

I'd ExportAsText and IMPORT the text file into an existing workbook via Data/get External Data/Import... But, then again, this looks like a REPORT (YUK!) I just HATE getting REPORTS rather than DATA since reports are a BEAR to work with. If it is a REPORT, then IMPORT will not work very well.


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top