Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IME MODE FOR EXCEL 2007 (URGENT URGENT) | Excel Discussion (Misc queries) | |||
Need Answers to Urgent Questions on Excel! Hurry, oh, please hurry! | Excel Discussion (Misc queries) | |||
EXCEL Hyperlink to Charts Questions.. URGENT.. =( | Excel Discussion (Misc queries) | |||
Urgent Chart Questions | Excel Discussion (Misc queries) | |||
Two Questions about the Following Block of Code | Excel Programming |