Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Urgent questions regarding the code below

Regarding the code below,

1) How to code to make an Excel file open in NON-ReadOnly mode?

2) Is the line "document.write( )" indeed the way in Netscape to open
an Excel file if you pass a http:/ link? If so, why didn't it work?
Are there any other ways to open files in Netscape?


Thx!

Helena


<script language="JavaScript"

var ua = navigator.userAgent.toLowerCase();

// Browsers: Netscape has a lot of impostors

bNN = (ua.indexOf('mozilla') != -1 && ua.indexOf('compatible') == -1
&&ua.indexOf('opera') == -1 && ua.indexOf('hotjava') == -1
&&ua.indexOf('webtv') == -1 && ua.indexOf('spoofer') == -1);

bIE = (ua.indexOf('msie') != -1 && ua.indexOf('opera') == -1);

function openFile(strFile)
{
if(bIE)
{
alert("ie " + strFile); //open files this way

if(typeof ActiveXObject != 'undefined')
{
// new ActiveXObject can be called.

var myApp = new ActiveXObject("Excel.Application");

//alert("here " + myApp);

if (myApp != null)
{
myApp.Visible = true;

//How to code to make an Excel file open in NON-ReadOnly mode?

myApp.Workbooks.Open(strFile);
myApp.Workbooks(strFile).Activate;

}
}
}

else
{
alert("other " + strFile); //opening file another way

// Is the line "document.write( )" indeed the way in Netscape to open
an Excel file if you pass a http:/ link? If so, why didn't it work?
Are there any other ways to open files in Netscape?


document.write("<a href='" + strFile + "' target='_blank'");

}
}
</script

Thank you for your expertise!

Helena
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Urgent questions regarding the code below

Does this:
Workbooks.Open "FileLocation\FileName.xls", , False
not work? That's the VBA code.


-----Original Message-----
Regarding the code below,

1) How to code to make an Excel file open in NON-ReadOnly

mode?

2) Is the line "document.write( )" indeed the way in

Netscape to open
an Excel file if you pass a http:/ link? If so, why

didn't it work?
Are there any other ways to open files in Netscape?


Thx!

Helena


<script language="JavaScript"

var ua = navigator.userAgent.toLowerCase();

// Browsers: Netscape has a lot of impostors

bNN = (ua.indexOf('mozilla') != -1 && ua.indexOf

('compatible') == -1
&&ua.indexOf('opera') == -1 && ua.indexOf('hotjava') == -1
&&ua.indexOf('webtv') == -1 && ua.indexOf('spoofer') == -

1);

bIE = (ua.indexOf('msie') != -1 && ua.indexOf('opera')

== -1);

function openFile(strFile)
{
if(bIE)
{
alert("ie " + strFile); //open files this way

if(typeof ActiveXObject != 'undefined')
{
// new ActiveXObject can be called.

var myApp = new ActiveXObject("Excel.Application");

//alert("here " + myApp);

if (myApp != null)
{
myApp.Visible = true;

//How to code to make an Excel file open in NON-ReadOnly

mode?

myApp.Workbooks.Open(strFile);
myApp.Workbooks(strFile).Activate;

}
}
}

else
{
alert("other " + strFile); //opening file another way

// Is the line "document.write( )" indeed the way in

Netscape to open
an Excel file if you pass a http:/ link? If so, why

didn't it work?
Are there any other ways to open files in Netscape?


document.write("<a href='" + strFile + "'

target='_blank'");

}
}
</script

Thank you for your expertise!

Helena
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Need Answers to Urgent Questions on Excel! Hurry, oh, please hurry! [email protected] Excel Discussion (Misc queries) 1 August 31st 05 08:14 PM
EXCEL Hyperlink to Charts Questions.. URGENT.. =( kaci Excel Discussion (Misc queries) 4 August 1st 05 02:34 PM
Urgent Chart Questions Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Two Questions about the Following Block of Code Greener Excel Programming 0 October 9th 03 06:26 PM


All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"