![]() |
Stop a Macro if no Data found
I have a macro that imports a text file. Sometimes the text file contains no
data. I have the macro display a messge box saying that there is no data. What I would like is for the macro to stop when the user clicks OK on the message box. Does anyone know the code for that? Thanks |
Stop a Macro if no Data found
variable = [check how many rows were imported]
if variable = 0 then msgbox "blabla" exit sub end if |
All times are GMT +1. The time now is 08:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com