Ramo964516
04-01-2016, 03:41 AM
Hi everybody,
I have some VBA code wich generates a bug. The message is : "excel vba error 91 object variable or with block variable not set"
The bug code is :
strAdrDateEnvoiRelance = Range("C1:C100").Find(DateSerial(Mid(strAyJourOuvréMois(i), 7, 4), Mid(strAyJourOuvréMois(i), 4, 2), Mid(strAyJourOuvréMois(i), 1, 2)), Range("C1")).Address(False, False)
The value of the variable
strAyJourOuvréMois(i)=01/04/2016
The vba code run when the sheet (Solde mensuel 2016) from the workbook (Palettes europe BMF 2016) is activated. and then it looks for values less than -100 , copy them paste them in another workbook, check for the net work days of the month and then creating a table in the top of the same sheet.
all the code runs well, but the last section when it hae to lookfor values in the table create a bug. But i really don't know how to fix this bug. I checked almost every posts concerning this type of error, i tried the same synthax of the error line in another sheet and it works.
Can somebody see why it doesn't work?
Thanks for your help
157891579115790
I have some VBA code wich generates a bug. The message is : "excel vba error 91 object variable or with block variable not set"
The bug code is :
strAdrDateEnvoiRelance = Range("C1:C100").Find(DateSerial(Mid(strAyJourOuvréMois(i), 7, 4), Mid(strAyJourOuvréMois(i), 4, 2), Mid(strAyJourOuvréMois(i), 1, 2)), Range("C1")).Address(False, False)
The value of the variable
strAyJourOuvréMois(i)=01/04/2016
The vba code run when the sheet (Solde mensuel 2016) from the workbook (Palettes europe BMF 2016) is activated. and then it looks for values less than -100 , copy them paste them in another workbook, check for the net work days of the month and then creating a table in the top of the same sheet.
all the code runs well, but the last section when it hae to lookfor values in the table create a bug. But i really don't know how to fix this bug. I checked almost every posts concerning this type of error, i tried the same synthax of the error line in another sheet and it works.
Can somebody see why it doesn't work?
Thanks for your help
157891579115790