ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading the Registry - CSV Download Flag (https://www.excelbanter.com/excel-programming/284582-reading-registry-csv-download-flag.html)

Tim Childs[_6_]

Reading the Registry - CSV Download Flag
 
Hi

I am trying to read the flag for determining if the
machine will prompt for confirmation when doing a CSV
download.

The code I am using is:

Sub RegRead_new()
Dim wsh As Object
Set wsh = CreateObject("WScript.Shell")
'errors with Type 13 mismatch
MsgBox wsh.RegRead
("HKEY_CLASSES_ROOT\Excel.CSV\EditFlags")
Set wsh = Nothing
End Sub



but it errors

the response from Bill M. on the key location is copied at
the end for info

Any help most welcome

thanks

Tim


"You mean the "Confirm open after download" flag?

Experiment suggests that:
HKEY_CLASSES_ROOT\Excel.CSV\EditFlags has value 65536 if
the flag is NOT set (and 0 if it is). I suspect it might
be a bit-map and so you should probably only change the 1
bit in the key value.

Bill Manville"



Tom Ogilvy

Reading the Registry - CSV Download Flag
 
Worked OK for me in Windows 2000 with Excel 2000 installed.

--
Regards,
Tom Ogilvy

"Tim Childs" wrote in message
...
Hi

I am trying to read the flag for determining if the
machine will prompt for confirmation when doing a CSV
download.

The code I am using is:

Sub RegRead_new()
Dim wsh As Object
Set wsh = CreateObject("WScript.Shell")
'errors with Type 13 mismatch
MsgBox wsh.RegRead
("HKEY_CLASSES_ROOT\Excel.CSV\EditFlags")
Set wsh = Nothing
End Sub



but it errors

the response from Bill M. on the key location is copied at
the end for info

Any help most welcome

thanks

Tim


"You mean the "Confirm open after download" flag?

Experiment suggests that:
HKEY_CLASSES_ROOT\Excel.CSV\EditFlags has value 65536 if
the flag is NOT set (and 0 if it is). I suspect it might
be a bit-map and so you should probably only change the 1
bit in the key value.

Bill Manville"





Tim Childs[_6_]

Reading the Registry - CSV Download Flag
 
Tom

thanks for response

it failed for me on Woindows NT and Excel 2000, sadly

Tim


-----Original Message-----
Worked OK for me in Windows 2000 with Excel 2000

installed.

--
Regards,
Tom Ogilvy



Tom Ogilvy

Reading the Registry - CSV Download Flag
 
have you used regedit to look at the key value?

Your mismatch error seems like an odd error for what you are doing.

--
Regards,
Tom Ogilvy


"Tim Childs" wrote in message
...
Tom

thanks for response

it failed for me on Woindows NT and Excel 2000, sadly

Tim


-----Original Message-----
Worked OK for me in Windows 2000 with Excel 2000

installed.

--
Regards,
Tom Ogilvy





Tim Childs

Reading the Registry - CSV Download Flag
 
Tom

thanks for this help

will do some more searching in that area.

can you confirm that the registry entries will be have a difffernet string
(HKEY_CLASSES_ROOT\Excel.CSV\EditFlags) in different operating systems?

thanks

Tim


"Tom Ogilvy" wrote in message
...
have you used regedit to look at the key value?

Your mismatch error seems like an odd error for what you are doing.

--
Regards,
Tom Ogilvy






Tim Childs

Reading the Registry - CSV Download Flag
 
Hi

when accessing the data in the registry (see code below) I seem to be
getting a variant array returned i.e. each octet is taking a place in
a single dimension array with 3/4 entries. (printarray is a utility
proc. for printing arrays) Can you provide some further
information/background information on this, please?

thanks

Tim


Sub RegRead_new()
Dim wsh As Object
Dim v

Set wsh = CreateObject("WScript.Shell")
v = wsh.RegRead("HKEY_CLASSES_ROOT\Excel.CSV\EditFlags ")
Call PrintArray(v, "v")

Set wsh = Nothing
End Sub

Tim Childs

Reading the Registry - CSV Download Flag
 
Hi

pl can someone get me started or, at least, tell me what's wrong with the
question?

thanks

Tim

"Tim Childs" wrote in message
om...
Hi

when accessing the data in the registry (see code below) I seem to be
getting a variant array returned i.e. each octet is taking a place in
a single dimension array with 3/4 entries. (printarray is a utility
proc. for printing arrays) Can you provide some further
information/background information on this, please?

thanks

Tim


Sub RegRead_new()
Dim wsh As Object
Dim v

Set wsh = CreateObject("WScript.Shell")
v = wsh.RegRead("HKEY_CLASSES_ROOT\Excel.CSV\EditFlags ")
Call PrintArray(v, "v")

Set wsh = Nothing
End Sub





All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com