Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want a msgBox when a cell i empty, I can´t get the cod to work, do anyone know how to do this? My code are Dim Period As Date Period = ActiveSheet.Range("b3") If Period="" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub -- Best regards Mia |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Dim Period As Date If ActiveSheet.Range("b3") = "" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub Else Period = ActiveSheet.Range("b3") End If -- Jacob "Mia" wrote: Hi, I want a msgBox when a cell i empty, I can´t get the cod to work, do anyone know how to do this? My code are Dim Period As Date Period = ActiveSheet.Range("b3") If Period="" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub -- Best regards Mia |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you so much!!!
-- Best regards Mia "Jacob Skaria" skrev: Try Dim Period As Date If ActiveSheet.Range("b3") = "" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub Else Period = ActiveSheet.Range("b3") End If -- Jacob "Mia" wrote: Hi, I want a msgBox when a cell i empty, I can´t get the cod to work, do anyone know how to do this? My code are Dim Period As Date Period = ActiveSheet.Range("b3") If Period="" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub -- Best regards Mia |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You need to put the code in the activsheet code module or in the sheet code module for the sheet you are working on. Mia;616610 Wrote: Hi, I want a msgBox when a cell i empty, I can´t get the cod to work, do anyone know how to do this? My code are Dim Period As Date Period = ActiveSheet.Range("b3") If Period="" Then MsgBox "Du har glömt att välja sorteringsperiod", vbCritical Exit Sub -- Best regards Mia -- Simon Lloyd Regards, Simon Lloyd 'Microsoft Office Help' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: 1 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=171308 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find last non empty cell in a column and display value in msgbox | Excel Programming | |||
find empty cells in a column then append row that empty cell is in | Excel Programming | |||
Macro display Msgbox when cells are empty | Excel Discussion (Misc queries) | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
Finding next empty empty cell in a range of columns | Excel Programming |