Respostas criadas no fórum
-
AutorArtigos
-
jorgerod
Administradorolá wagner!!!!
tenho um grande apreço por todos os que publicam respostas a questões, mesmo que sejam as suas questôes e que consigam, de modo próprio, resolvê-las, como foi o teu caso!!!! 🙂
obrigado, wagner e, por favor, continua a desenvolver os teus trabalhos e a sugerir soluções!!!!
mais uma vez, obrigado!!!!! a comunidade exceleriana, agradece!!!! 😉
jorgerod
Administradorwagner,
o mvp ron de bruin tem muita coisa sobre esta matéria. podes ver em:
http://www.rondebruin.nl/sendmail.htm
fica bem.
jorgerod
Administradorwagner,
o que pretendes é enviar, via planilha do excel, para o outlook, um e-mail que arraste consigo essa planilha? outra planilha? podes explicar melhor e mais detalhadamente, qual é o teu propósito?
fica bem.
jorgerod
Administradorvê possível resposta, em http://www.cpearson.com/excel/datedif.aspx
a função, em português é datadif.
fica bem
jorgerod
Administradorjorgerod
Administradorboas,
pelo que vi, um código possível poderá ser o seguinte:
private sub workbook_beforeprint(cancel as boolean)
on error goto errhandler
if activesheet.name = “funcionários (20h00 as 08h00)” then
application.enableevents = false
with activesheet
on error resume next
.columns(“a”).specialcells(xlcelltypeblanks).entirerow.hidden = true
.printout
.columns(“a”).specialcells(xlcelltypeblanks).entirerow.hidden = false
on error goto 0
end with
cancel = true
end if
errhandler:
application.enableevents = true
end subo evento workbook_beforeprint funciona automaticamente quando se pretende imprimir, ou seja, vai verificar quais são as linhas que estão vazias e apenas imprime as linhas que tenham a coluna “a” preenchida.
reenvio a planilha com o código incorporado, para verificares se está correcto. o código está inserido no próprio workbook, a fim de poder ser executado automaticamente quando se pretende imprimir.
fica bem e diz qq coisa, ok?
obrigado.
jorgerod
Administradorboas,
podes colocar aqui um exemplo através de uma planilha?
jorgerod
Administradorboas,
vê em http://www.vbaexpress.com/kb/getarticle.php?kb_id=605 e adapta.
jorgerod
Administradorvê, igualmente, em: http://www.jkp-ads.com/articles/apideclarations.asp
pode ser que te ajude mais alguma coisa.
fica bem.
jorgerod
Administradoralbino,
tenta adaptar o seguinte código:
option explicit
private sub combobox1_enter()dim msg as string, strcriteria as string
dim lastrow as long, rnglist as rangemsg = “please enter 3 digits, example: 123”
lastrow = sheet1.cells(rows.count, 1).end(xlup).row
strcriteria = “=” & application.inputbox(msg, “enter three digits”, type:=2) & “*”
with sheet1 ‘sheet code name
‘turn off any filters before creating unique list
if .autofiltermode = true then .autofiltermode = false
‘ apply auto-filter using the value from the input box
.range(“a1”).autofilter field:=1, criteria1:=strcriteria, operator:=xland
‘ define the range for the filtered values
set rnglist = .range(“a1:a” & lastrow).specialcells(xlcelltypevisible)‘ clear the paste range to receive fresh content
.range(“g1”).currentregion.resize(, 1).clearcontents
rnglist.copy .range(“g1”)
end with‘ set the row source of the combo box the refernce the filtered list
with me.combobox1
.rowsource = sheet1.range(“g1”).currentregion.address
end withset rnglist = nothing
end sub
pode ser que te ajude. diz depois qq coisa, ok? e, se conseguires adaptar, coloca aqui 🙂
fica bem.
jorgerod
Administradoralbino,
podes experimentar, para ver se funciona, desta maneira?
private sub textbox7_exit(byval cancel as msforms.returnboolean)
with textbox7
textbox7 = vba.format(textbox7, “[<=999999999]### ### ###;(###) ### ### ###")
end with
end subobrigado e fica bem.
jorgerod
Administradoralbino,
eu, para este tipo de situações, vou pelo mais “fácil”. assim, o código que costumo utilizar é o seguinte, o qual podes adaptar à tua maneira:
private sub telemovel_exit(byval cancel as msforms.returnboolean)
with telemovel
telemovel = format(telemovel, “[<=999999999]### ### ###;(###) ### ### ###")
end with
end subfica bem.
jorgerod
Administradorwagner, já leste sobre compatibilidade entre as versões de 32 bits e de 64 bits do microsoft office 2010? eu escrevi alguma coisa sobre isso, mas forneci alguns links que se referem às necessidades básicas, ou seja, tens que efectuar os necessários “declare”, para poderes compatibilizar os códigos para 32 bits e para 64 bits.
fica bem.
jorgerod
Administradortalvez utilizando o seguinte segmento: n = sheets(1).cells(4, 3).value
jorgerod
Administradorquanto à estrutura dos menus: podes tentar fazer a instalação de menus alternativos (tipo 2003), a partir de:
http://www.howtogeek.com/howto/19323/bring-office-2003-menus-back-to-2010-with-ubitmenu/
-
AutorArtigos
EXCELer Tudo sobre EXCEL em Português