Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#7288
Caros,
poderiam me auxiliar na macro para eu determinar que mais de uma célula seja preenchida obrigatoriamente.
A macro que estou utilizando é:

Private Sub Workbook_BeforeSave(ByVal SaveAsUi As Boolean, Cancel As Boolean)
'impede salvar se houver celula vazia 'M31'
If Application.CountBlank(Range("M31")) > 0 Then
MsgBox "O campo OBRA não está preenchido." & vbLf & _
"Documento não será salvo", vbExclamation
Cancel = True
End If
End Sub

Preciso acrescentar mais duas células para serem preenchidas: K10 e L10. Porém, para elas deverá aparecer:
MsgBox " O campo DATA não está preenchido"
Além de continuar a informação caso a célula M31 não seja preenchida.

Grato

Luciano
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord