ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trying to cobble together two bis of code (Unsuccessfully) (https://www.excelbanter.com/excel-programming/415589-re-trying-cobble-together-two-bis-code-unsuccessfully.html)

Diddy

Trying to cobble together two bis of code (Unsuccessfully)
 
Hi Keith,

Thanks for responding :-)

I don't think so

I'm probably missing something really important

Thanks anyway
--
Deirdre


"Keith74" wrote:

Does using

MsgBox cstr(MyPath)

make a difference ?



Keith74

Trying to cobble together two bis of code (Unsuccessfully)
 
Hi

The reason i said that is that the msgbox will only accept a variable
it can display as a string, i'm guessing you're getting the "type
mismatch" on the message box. Put a watch on myPath and step through
the code to see what value myPath has. It looks like myPath is
probably the wrong variable to be using.


Diddy

Trying to cobble together two bis of code (Unsuccessfully)
 
Hi Keith,

You are right

Watch : : mypath : <Expression not defined in context : Empty :
UnProtSheetsinBooksInFolder.unprotectshts

I'm lost !


--
Deirdre


"Keith74" wrote:

Hi

The reason i said that is that the msgbox will only accept a variable
it can display as a string, i'm guessing you're getting the "type
mismatch" on the message box. Put a watch on myPath and step through
the code to see what value myPath has. It looks like myPath is
probably the wrong variable to be using.




All times are GMT +1. The time now is 04:47 PM.

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