- Este tópico contém 10 respostas, 3 utilizadores e foi actualizado pela última vez há 12 anos, 4 meses por Anónimo.
-
AutorArtigos
-
-
24 de Março de 2010 às 23:44 #825pmonicaParticipante
olá jrod!
olá pessoal!andei distante do excel por uns tempos, mas cá estou de volta!
ando a trabalhar num ficheiro de excel com macros userforme, etc. e recentemente quando abro esse mesmo ficheiro aparece-me uma janela com o titulo deste “post” e com indicação “application-defined or object-defined error”.
alguém me sabe explicar o que poderá estar a provocar esta situação e como posso eliminar este erro?saudações
:s
RUNTIME_ERROR_1004.PNGAttachments:
You must be logged in to view attached files. -
25 de Março de 2010 às 18:19 #1372jorgerodAdministrador
paulo,
coloca aqui o eu código, porque julgo que haverá um erro de conteúdo.
-
25 de Março de 2010 às 18:31 #1373pmonicaParticipante
bem,
não dá bem para colar o código!
a janela de erro aparece sempre que abro o ficheiro! como nem dá hipótese de debug, não dá para ver o que está mal!
ando a trabalhar no ficheiro há 1 semana e só à 2 dias é que a janela de erro apareceu.
terá a ver com o outro post que respondeste? no caso do nome do utilizador do excel ser diferente?
….
:silly: :silly: :silly: :angry: :angry: :angry: -
25 de Março de 2010 às 18:34 #1374pmonicaParticipante
e para te enviar o ficheiro, tem uns 10 userforms, umas 30 macros, dáva-te um trabalhão…
se não te ocorrer uma solução vou ter que encontrar uma alternativa, nem que comece tudo num outro ficheiro “virgem”! -
26 de Março de 2010 às 2:11 #1375pmonicaParticipante
jrod,
esquece este problema!
apaguei o código da minha outra questão do “este livro” e o erro desapareceu.
até podia precisar dele, mas não é grave se não o tiver!
no entanto se conseguires encontrar uma correlação entre as duas situações, apita!saudações
paulo mónica -
26 de Março de 2010 às 2:48 #1376jorgerodAdministrador
ok… problema esquecido! 🙂
-
3 de Dezembro de 2011 às 2:05 #1755AnónimoInactivo
olá pessoal …
tenho o mesmo problema, poderiam me ajudar
desde já, grato…segue abaixo o meu código
option explicit
‘dados cadastrais do paciente
const colcodigodopaciente as integer = 1
const colnomedopaciente as integer = 2
const colidade as integer = 3
const colsexo as integer = 4
const colnomedoconsultor as integer = 5
const colregistro as integer = 6
const colendereco as integer = 7
const colnumero as integer = 8
const colbairro as integer = 9
const colcidade as integer = 10
const colregiao as integer = 11
const colcep as integer = 12
const colpais as integer = 13
const coltelefone as integer = 14
const colcelular as integer = 15
const colemail as integer = 16‘dados da anaminese
‘parâmetros do paciente
‘antropometria
const coldatadaantropometria1 as integer = 17
const colpeso1 as integer = 18
const colaltura1 as integer = 19
const colimc1 as integer = 20
const colcintura1 as integer = 21
const colquadril1 as integer = 22
const colicq1 as integer = 23const coldatadaantropometria2 as integer = 24
const colpeso2 as integer = 25
const colaltura2 as integer = 26
const colimc2 as integer = 27
const colcintura2 as integer = 28
const colquadril2 as integer = 29
const colicq2 as integer = 30const coldatadaantropometria3 as integer = 31
const colpeso3 as integer = 32
const colaltura3 as integer = 33
const colimc3 as integer = 34
const colcintura3 as integer = 35
const colquadril3 as integer = 36
const colicq3 as integer = 37const coldatadaantropometria4 as integer = 38
const colpeso4 as integer = 39
const colaltura4 as integer = 40
const colimc4 as integer = 41
const colcintura4 as integer = 42
const colquadril4 as integer = 43
const colicq4 as integer = 44const coldatadaantropometria5 as integer = 45
const colpeso5 as integer = 46
const colaltura5 as integer = 47
const colimc5 as integer = 48
const colcintura5 as integer = 49
const colquadril5 as integer = 50
const colicq5 as integer = 51const coldatadaantropometria6 as integer = 52
const colpeso6 as integer = 53
const colaltura6 as integer = 54
const colimc6 as integer = 55
const colcintura6 as integer = 56
const colquadril6 as integer = 57
const colicq6 as integer = 58const coldatadaantropometria7 as integer = 59
const colpeso7 as integer = 60
const colaltura7 as integer = 61
const colimc7 as integer = 62
const colcintura7 as integer = 63
const colquadril7 as integer = 64
const colicq7 as integer = 65‘glicemia capilar fase 01
const colglicemia1f01 as integer = 66
const coljejum1f01 as integer = 67
const colposjejum1f01 as integer = 68const colglicemia1f02 as integer = 69
const coljejum1f02 as integer = 70
const colposjejum1f02 as integer = 71const colglicemia1f03 as integer = 72
const coljejum1f03 as integer = 73
const colposjejum1f03 as integer = 74const colglicemia1f04 as integer = 75
const coljejum1f04 as integer = 76
const colposjejum1f04 as integer = 77const colglicemia1f05 as integer = 78
const coljejum1f05 as integer = 79
const colposjejum1f05 as integer = 80const colglicemia1f06 as integer = 81
const coljejum1f06 as integer = 82
const colposjejum1f06 as integer = 83const colglicemia1f07 as integer = 84
const coljejum1f07 as integer = 85
const colposjejum1f07 as integer = 86‘glicemia capilar fase 02
const colglicemia2f01 as integer = 87
const coljejum2f01 as integer = 88
const colposjejum2f01 as integer = 89const colglicemia2f02 as integer = 90
const coljejum2f02 as integer = 91
const colposjejum2f02 as integer = 92const colglicemia2f03 as integer = 93
const coljejum2f03 as integer = 94
const colposjejum2f03 as integer = 95const colglicemia2f04 as integer = 96
const coljejum2f04 as integer = 97
const colposjejum2f04 as integer = 98const colglicemia2f05 as integer = 99
const coljejum2f05 as integer = 100
const colposjejum2f05 as integer = 101const colglicemia2f06 as integer = 102
const coljejum2f06 as integer = 103
const colposjejum2f06 as integer = 104const colglicemia2f07 as integer = 105
const coljejum2f07 as integer = 106
const colposjejum2f07 as integer = 107‘pressão arterial fase 01
const coldatapa1f01 as integer = 108
const colhorapa1f01 as integer = 109
const colpaspa1f01 as integer = 110
const colpadpa1f01 as integer = 111const coldatapa1f02 as integer = 112
const colhorapa1f02 as integer = 113
const colpaspa1f02 as integer = 114
const colpadpa1f02 as integer = 115const coldatapa1f03 as integer = 116
const colhorapa1f03 as integer = 117
const colpaspa1f03 as integer = 118
const colpadpa1f03 as integer = 119const coldatapa1f04 as integer = 120
const colhorapa1f04 as integer = 121
const colpaspa1f04 as integer = 122
const colpadpa1f04 as integer = 123const coldatapa1f05 as integer = 124
const colhorapa1f05 as integer = 125
const colpaspa1f05 as integer = 126
const colpadpa1f05 as integer = 127const coldatapa1f06 as integer = 128
const colhorapa1f06 as integer = 129
const colpaspa1f06 as integer = 130
const colpadpa1f06 as integer = 131const coldatapa1f07 as integer = 132
const colhorapa1f07 as integer = 133
const colpaspa1f07 as integer = 134
const colpadpa1f07 as integer = 135‘pressão arterial fase 02
const coldatapa2f01 as integer = 136
const colhorapa2f01 as integer = 137
const colpaspa2f01 as integer = 138
const colpadpa2f01 as integer = 139const coldatapa2f02 as integer = 140
const colhorapa2f02 as integer = 141
const colpaspa2f02 as integer = 142
const colpadpa2f02 as integer = 143const coldatapa2f03 as integer = 144
const colhorapa2f03 as integer = 145
const colpaspa2f03 as integer = 146
const colpadpa2f03 as integer = 147const coldatapa2f04 as integer = 148
const colhorapa2f04 as integer = 149
const colpaspa2f04 as integer = 150
const colpadpa2f04 as integer = 151const coldatapa2f05 as integer = 152
const colhorapa2f05 as integer = 153
const colpaspa2f05 as integer = 154
const colpadpa2f05 as integer = 155const coldatapa2f06 as integer = 156
const colhorapa2f06 as integer = 157
const colpaspa2f06 as integer = 158
const colpadpa2f06 as integer = 159const coldatapa2f07 as integer = 160
const colhorapa2f07 as integer = 161
const colpaspa2f07 as integer = 162
const colpadpa2f07 as integer = 163‘dados laboratoriais
const coldatadadoslab1 as integer = 164
const colhba1cdadoslab1 as integer = 165
const colglicjjdadoslab1 as integer = 166
const colcoltdadoslab1 as integer = 167
const coltgdadoslab1 as integer = 168
const colldlcdadoslab1 as integer = 169
const colhdlcdadoslab1 as integer = 170const coldatadadoslab2 as integer = 171
const colhba1cdadoslab2 as integer = 172
const colglicjjdadoslab2 as integer = 173
const colcoltdadoslab2 as integer = 174
const coltgdadoslab2 as integer = 175
const colldlcdadoslab2 as integer = 176
const colhdlcdadoslab2 as integer = 177const coldatadadoslab3 as integer = 178
const colhba1cdadoslab3 as integer = 179
const colglicjjdadoslab3 as integer = 180
const colcoltdadoslab3 as integer = 181
const coltgdadoslab3 as integer = 182
const colldlcdadoslab3 as integer = 183
const colhdlcdadoslab3 as integer = 184const coldatadadoslab4 as integer = 185
const colhba1cdadoslab4 as integer = 186
const colglicjjdadoslab4 as integer = 187
const colcoltdadoslab4 as integer = 188
const coltgdadoslab4 as integer = 189
const colldlcdadoslab4 as integer = 190
const colhdlcdadoslab4 as integer = 191const coldatadadoslab5 as integer = 192
const colhba1cdadoslab5 as integer = 193
const colglicjjdadoslab5 as integer = 194
const colcoltdadoslab5 as integer = 195
const coltgdadoslab5 as integer = 196
const colldlcdadoslab5 as integer = 197
const colhdlcdadoslab5 as integer = 198const coldatadadoslab6 as integer = 199
const colhba1cdadoslab6 as integer = 200
const colglicjjdadoslab6 as integer = 201
const colcoltdadoslab6 as integer = 202
const coltgdadoslab6 as integer = 203
const colldlcdadoslab6 as integer = 204
const colhdlcdadoslab6 as integer = 205‘problemas de saúde
const colinicio1infops1 as integer = 206
const col1infopsinfbasps1 as integer = 207
const colinicio1infops2 as integer = 208
const col1infopspreexpps1 as integer = 209const colinicio2infops1 as integer = 210
const col2infopsinfbasps1 as integer = 211
const colinicio2infops2 as integer = 212
const col2infopspreexpps1 as integer = 213const colinicio3infops1 as integer = 214
const col3infopsinfbasps1 as integer = 215
const colinicio3infops2 as integer = 216
const col3infopspreexpps1 as integer = 217const colinicio4infops1 as integer = 218
const col4infopsinfbasps1 as integer = 219
const colinicio4infops2 as integer = 220
const col4infopspreexpps1 as integer = 221const colinicio5infops1 as integer = 222
const col5infopsinfbasps1 as integer = 223
const colinicio5infops2 as integer = 224
const col5infopspreexpps1 as integer = 225const colinicio6infops1 as integer = 226
const col6infopsinfbasps1 as integer = 227
const colinicio6infops2 as integer = 228
const col6infopspreexpps1 as integer = 229‘medicamentos em uso
const colmed01medicamento1 as integer = 230
const colmed01subsativa1 as integer = 231
const colmed01usopara1 as integer = 232
const colmed01posprescrita1 as integer = 233
const colmed01posusada1 as integer = 234
const colmed01medico1 as integer = 235
const colmed01crm1 as integer = 236
const colmed01uf1 as integer = 237
const colmed01melhor1 as integer = 238
const colmed01algestranho1 as integer = 239
const colmed01datainicio1 as integer = 240
const colmed01datafim1 as integer = 241
const colmed01modousaadm1 as integer = 242
const colmed01obs1 as integer = 243const colmed02medicamento1 as integer = 244
const colmed02subsativa1 as integer = 245
const colmed02usopara1 as integer = 246
const colmed02posprescrita1 as integer = 247
const colmed02posusada1 as integer = 248
const colmed02medico1 as integer = 249
const colmed02crm1 as integer = 250
const colmed02uf1 as integer = 251
const colmed02melhor1 as integer = 252
const colmed02algestranho1 as integer = 253
const colmed02datainicio1 as integer = 254
const colmed02datafim1 as integer = 255
const colmed02modousaadm1 as integer = 256
const colmed02obs1 as integer = 257const colmed03medicamento1 as integer = 258
const colmed03subsativa1 as integer = 259
const colmed03usopara1 as integer = 260
const colmed03posprescrita1 as integer = 261
const colmed03posusada1 as integer = 262
const colmed03medico1 as integer = 263
const colmed03crm1 as integer = 264
const colmed03uf1 as integer = 265
const colmed03melhor1 as integer = 266
const colmed03algestranho1 as integer = 267
const colmed03datainicio1 as integer = 268
const colmed03datafim1 as integer = 269
const colmed03modousaadm1 as integer = 270
const colmed03obs1 as integer = 271const colmed04medicamento1 as integer = 272
const colmed04subsativa1 as integer = 273
const colmed04usopara1 as integer = 274
const colmed04posprescrita1 as integer = 275
const colmed04posusada1 as integer = 276
const colmed04medico1 as integer = 277
const colmed04crm1 as integer = 278
const colmed04uf1 as integer = 279
const colmed04melhor1 as integer = 280
const colmed04algestranho1 as integer = 281
const colmed04datainicio1 as integer = 282
const colmed04datafim1 as integer = 283
const colmed04modousaadm1 as integer = 284
const colmed04obs1 as integer = 285const colmed05medicamento1 as integer = 286
const colmed05subsativa1 as integer = 287
const colmed05usopara1 as integer = 288
const colmed05posprescrita1 as integer = 289
const colmed05posusada1 as integer = 290
const colmed05medico1 as integer = 291
const colmed05crm1 as integer = 292
const colmed05uf1 as integer = 293
const colmed05melhor1 as integer = 294
const colmed05algestranho1 as integer = 295
const colmed05datainicio1 as integer = 296
const colmed05datafim1 as integer = 297
const colmed05modousaadm1 as integer = 298
const colmed05obs1 as integer = 299const colmed06medicamento1 as integer = 300
const colmed06subsativa1 as integer = 301
const colmed06usopara1 as integer = 302
const colmed06posprescrita1 as integer = 303
const colmed06posusada1 as integer = 304
const colmed06medico1 as integer = 305
const colmed06crm1 as integer = 306
const colmed06uf1 as integer = 307
const colmed06melhor1 as integer = 308
const colmed06algestranho1 as integer = 309
const colmed06datainicio1 as integer = 310
const colmed06datafim1 as integer = 311
const colmed06modousaadm1 as integer = 312
const colmed06obs1 as integer = 313const colmed07medicamento1 as integer = 314
const colmed07subsativa1 as integer = 315
const colmed07usopara1 as integer = 316
const colmed07posprescrita1 as integer = 617
const colmed07posusada1 as integer = 318
const colmed07medico1 as integer = 319
const colmed07crm1 as integer = 320
const colmed07uf1 as integer = 321
const colmed07melhor1 as integer = 322
const colmed07algestranho1 as integer = 323
const colmed07datainicio1 as integer = 324
const colmed07datafim1 as integer = 325
const colmed07modousaadm1 as integer = 326
const colmed07obs1 as integer = 327‘histórico do paciente
const colhistorico1 as integer = 328‘observações à considerar
const colobsconsiderar1 as integer = 329const indiceminimo as byte = 2
const cordisabledtextbox as long = -2147483633
const corenabledtextbox as long = -2147483643
const nomeplanilhacadastro as string = “fornecedores”private wscadastro as worksheet
private wbcadastro as workbook
private indiceregistro as long
private sub botaosair_click()
unload me
end subprivate sub btncancelar_click()
btnok.enabled = false
btncancelar.enabled = false
call desabilitacontroles
call carregadadosinicial
call habilitabotoesalteracao
end subprivate sub btnok_click()
dim proximoid as long‘altera
if optalterar.value then
call salvaregistro(clng(txtcodigopaciente.text), indiceregistro)
lblmensagem.caption = “registro salvo com sucesso”
end if
‘novo
if optnovo.value then
proximoid = pegaproximoid
‘pega a próxima linha
dim proximoindice as long
‘atualiza o arquivo para pegar o próximo registro atualizado
call atualizararquivo(false)
proximoindice = wscadastro.usedrange.rows.count + 1
call salvaregistro(proximoid, proximoindice)
txtcodigopaciente = proximoid
lblmensagem.caption = “registro salvo com sucesso”
end if
‘excluir
if optexcluir.value then
dim result as vbmsgboxresult
result = msgbox(“deseja excluir o registro nº ” & txtcodigopaciente.text & ” ?”, vbyesno, “confirmação”)if result = vbyes then
‘abre o arquivo para escrita
call atualizararquivo(false)
wscadastro.range(wscadastro.cells(indiceregistro, colcodigodopaciente), wscadastro.cells(indiceregistro, colcodigodopaciente)).entirerow.delete
‘salva
wbcadastro.save
‘abre somente leitura
call atualizararquivo(true)
call carregadadosinicial
lblmensagem.caption = “registro excluído com sucesso”
end if
end ifcall habilitabotoesalteracao
call desabilitacontrolesend sub
private sub btnpesquisar_click()
frmpesquisa.show
end subprivate sub label16_click()
end sub
private sub optalterar_click()
if txtcodigopaciente.text vbnullstring and txtcodigopaciente.text “” then
call habilitacontroles
call desabilitabotoesalteracao
‘dá o foco ao primeiro controle de dados
txtnomepaciente.setfocus
else
lblmensagem.caption = “não há registro a ser alterado”
end if
end subprivate sub optexcluir_click()
if txtcodigopaciente.text vbnullstring and txtcodigopaciente.text “” then
call desabilitabotoesalteracao
lblmensagem.caption = “modo de exclusão. confira o dados do registro antes de excluí-lo”
else
lblmensagem.caption = “não há registro a ser excluído”
end if
end subprivate sub optnovo_click()
call limpacontroles
call habilitacontroles
call desabilitabotoesalteracao
‘dá o foco ao primeiro controle de dados
txtnomepaciente.setfocus
end sub
private sub userform_initialize()call defineplanilhadados
call habilitabotoesalteracao
call carregadadosinicial
call desabilitacontroles
end subprivate sub btnanterior_click()
if indiceregistro > indiceminimo then
indiceregistro = indiceregistro – 1
end if
if indiceregistro > 1 then
call carregaregistro
end if
end subprivate sub btnprimeiro_click()
indiceregistro = indiceminimo
if indiceregistro > 1 then
call carregaregistro
end if
end subprivate sub btnproximo_click()
if indiceregistro 1 then
call carregaregistro
end if
end subprivate sub btnultimo_click()
indiceregistro = wscadastro.usedrange.rows.count
if indiceregistro > 1 then
call carregaregistro
end if
end subprivate sub carregadadosinicial()
indiceregistro = 2
call carregaregistro
end subprivate sub carregaregistro()
‘carrega os dados do primeiro registro
with wscadastro
if not isempty(.cells(indiceregistro, colcodigodopaciente)) then
me.txtcodigopaciente.text = .cells(indiceregistro, colcodigodopaciente).value
me.txtnomepaciente.text = .cells(indiceregistro, colnomedopaciente).value
me.txtidade.text = .cells(indiceregistro, colidade).value
me.txtsexo.text = .cells(indiceregistro, colsexo).value
me.txtnomeconsultor.text = .cells(indiceregistro, colnomedoconsultor).value
me.txtregistro.text = .cells(indiceregistro, colregistro).value
me.txtendereco.text = .cells(indiceregistro, colendereco).value
me.txtnumero.text = .cells(indiceregistro, colnumero).value
me.txtbairro.text = .cells(indiceregistro, colbairro).value
me.txtcidade.text = .cells(indiceregistro, colcidade).value
me.txtregiao.text = .cells(indiceregistro, colregiao).value
me.txtcep.text = .cells(indiceregistro, colcep).value
me.txtpais.text = .cells(indiceregistro, colpais).value
me.txttelefone.text = .cells(indiceregistro, coltelefone).value
me.txtcelular.text = .cells(indiceregistro, colcelular).value
me.txtemail.text = .cells(indiceregistro, colemail).value‘parametros do paciente
me.txtdataantropometria1.text = .cells(indiceregistro, coldatadaantropometria1).value
me.txtpesoantropometria1.text = .cells(indiceregistro, colpeso1).value
me.txtalturaantropometria1.text = .cells(indiceregistro, colaltura1).value
me.txtimcantropometria1.text = .cells(indiceregistro, colimc1).value
me.txtcinturaantropometria1.text = .cells(indiceregistro, colcintura1).value
me.txtquadrilantropometria1.text = .cells(indiceregistro, colquadril1).value
me.txticqantropometria1.text = .cells(indiceregistro, colicq1).valueme.txtdataantropometria2.text = .cells(indiceregistro, coldatadaantropometria2).value
me.txtpesoantropometria2.text = .cells(indiceregistro, colpeso2).value
me.txtalturaantropometria2.text = .cells(indiceregistro, colaltura2).value
me.txtimcantropometria2.text = .cells(indiceregistro, colimc2).value
me.txtcinturaantropometria2.text = .cells(indiceregistro, colcintura2).value
me.txtquadrilantropometria2.text = .cells(indiceregistro, colquadril2).value
me.txticqantropometria2.text = .cells(indiceregistro, colicq2).valueme.txtdataantropometria3.text = .cells(indiceregistro, coldatadaantropometria3).value
me.txtpesoantropometria3.text = .cells(indiceregistro, colpeso3).value
me.txtalturaantropometria3.text = .cells(indiceregistro, colaltura3).value
me.txtimcantropometria3.text = .cells(indiceregistro, colimc3).value
me.txtcinturaantropometria3.text = .cells(indiceregistro, colcintura3).value
me.txtquadrilantropometria3.text = .cells(indiceregistro, colquadril3).value
me.txticqantropometria3.text = .cells(indiceregistro, colicq3).valueme.txtdataantropometria4.text = .cells(indiceregistro, coldatadaantropometria4).value
me.txtpesoantropometria4.text = .cells(indiceregistro, colpeso4).value
me.txtalturaantropometria4.text = .cells(indiceregistro, colaltura4).value
me.txtimcantropometria4.text = .cells(indiceregistro, colimc4).value
me.txtcinturaantropometria4.text = .cells(indiceregistro, colcintura4).value
me.txtquadrilantropometria4.text = .cells(indiceregistro, colquadril4).value
me.txticqantropometria4.text = .cells(indiceregistro, colicq4).valueme.txtdataantropometria5.text = .cells(indiceregistro, coldatadaantropometria5).value
me.txtpesoantropometria5.text = .cells(indiceregistro, colpeso5).value
me.txtalturaantropometria5.text = .cells(indiceregistro, colaltura5).value
me.txtimcantropometria5.text = .cells(indiceregistro, colimc5).value
me.txtcinturaantropometria5.text = .cells(indiceregistro, colcintura5).value
me.txtquadrilantropometria5.text = .cells(indiceregistro, colquadril5).value
me.txticqantropometria1.text = .cells(indiceregistro, colicq5).valueme.txtdataantropometria6.text = .cells(indiceregistro, coldatadaantropometria6).value
me.txtpesoantropometria6.text = .cells(indiceregistro, colpeso6).value
me.txtalturaantropometria6.text = .cells(indiceregistro, colaltura6).value
me.txtimcantropometria6.text = .cells(indiceregistro, colimc6).value
me.txtcinturaantropometria6.text = .cells(indiceregistro, colcintura6).value
me.txtquadrilantropometria6.text = .cells(indiceregistro, colquadril6).value
me.txticqantropometria6.text = .cells(indiceregistro, colicq6).valueme.txtdataantropometria7.text = .cells(indiceregistro, coldatadaantropometria7).value
me.txtpesoantropometria7.text = .cells(indiceregistro, colpeso7).value
me.txtalturaantropometria7.text = .cells(indiceregistro, colaltura7).value
me.txtimcantropometria7.text = .cells(indiceregistro, colimc7).value
me.txtcinturaantropometria7.text = .cells(indiceregistro, colcintura7).value
me.txtquadrilantropometria7.text = .cells(indiceregistro, colquadril7).value
me.txticqantropometria7.text = .cells(indiceregistro, colicq7).value‘glicemia capilar fase 1
me.txtglicemia1f01.text = .cells(indiceregistro, colglicemia1f01).value
me.txtjejum1f01.text = .cells(indiceregistro, coljejum1f01).value
me.txtposjejum1f01.text = .cells(indiceregistro, colposjejum1f01).valueme.txtglicemia1f02.text = .cells(indiceregistro, colglicemia1f02).value
me.txtjejum1f02.text = .cells(indiceregistro, coljejum1f02).value
me.txtposjejum1f02.text = .cells(indiceregistro, colposjejum1f02).valueme.txtglicemia1f03.text = .cells(indiceregistro, colglicemia1f03).value
me.txtjejum1f03.text = .cells(indiceregistro, coljejum1f03).value
me.txtposjejum1f03.text = .cells(indiceregistro, colposjejum1f03).valueme.txtglicemia1f04.text = .cells(indiceregistro, colglicemia1f04).value
me.txtjejum1f04.text = .cells(indiceregistro, coljejum1f04).value
me.txtposjejum1f05.text = .cells(indiceregistro, colposjejum1f04).valueme.txtglicemia1f05.text = .cells(indiceregistro, colglicemia1f05).value
me.txtjejum1f05.text = .cells(indiceregistro, coljejum1f05).value
me.txtposjejum1f05.text = .cells(indiceregistro, colposjejum1f05).valueme.txtglicemia1f06.text = .cells(indiceregistro, colglicemia1f06).value
me.txtjejum1f06.text = .cells(indiceregistro, coljejum1f06).value
me.txtposjejum1f06.text = .cells(indiceregistro, colposjejum1f06).valueme.txtglicemia1f07.text = .cells(indiceregistro, colglicemia1f07).value
me.txtjejum1f07.text = .cells(indiceregistro, coljejum1f07).value
me.txtposjejum1f07.text = .cells(indiceregistro, colposjejum1f07).value‘glicemia capilar fase 2
me.txtglicemia2f01.text = .cells(indiceregistro, colglicemia2f01).value
me.txtjejum2f01.text = .cells(indiceregistro, coljejum2f01).value
me.txtposjejum2f01.text = .cells(indiceregistro, colposjejum2f01).valueme.txtglicemia2f02.text = .cells(indiceregistro, colglicemia2f02).value
me.txtjejum2f02.text = .cells(indiceregistro, coljejum2f02).value
me.txtposjejum2f02.text = .cells(indiceregistro, colposjejum2f02).valueme.txtglicemia2f03.text = .cells(indiceregistro, colglicemia2f03).value
me.txtjejum2f03.text = .cells(indiceregistro, coljejum2f03).value
me.txtposjejum2f03.text = .cells(indiceregistro, colposjejum2f03).valueme.txtglicemia2f04.text = .cells(indiceregistro, colglicemia2f04).value
me.txtjejum2f04.text = .cells(indiceregistro, coljejum2f04).value
me.txtposjejum2f04.text = .cells(indiceregistro, colposjejum2f04).valueme.txtglicemia2f05.text = .cells(indiceregistro, colglicemia2f05).value
me.txtjejum2f05.text = .cells(indiceregistro, coljejum2f05).value
me.txtposjejum2f05.text = .cells(indiceregistro, colposjejum2f05).valueme.txtglicemia2f06.text = .cells(indiceregistro, colglicemia2f06).value
me.txtjejum2f06.text = .cells(indiceregistro, coljejum2f06).value
me.txtposjejum1f06.text = .cells(indiceregistro, colposjejum2f06).valueme.txtglicemia2f07.text = .cells(indiceregistro, colglicemia2f07).value
me.txtjejum2f07.text = .cells(indiceregistro, coljejum2f07).value
me.txtposjejum2f07.text = .cells(indiceregistro, colposjejum2f07).value‘pressão arterial fase 1
me.txtdatapa1f01.text = .cells(indiceregistro, coldatapa1f01).value
me.txthorapa1f01.text = .cells(indiceregistro, colhorapa1f01).value
me.txtpaspa1f01.text = .cells(indiceregistro, colpaspa1f01).value
me.txtpadpa1f01.text = .cells(indiceregistro, colpadpa1f01).valueme.txtdatapa1f02.text = .cells(indiceregistro, coldatapa1f02).value
me.txthorapa1f02.text = .cells(indiceregistro, colhorapa1f02).value
me.txtpaspa1f02.text = .cells(indiceregistro, colpaspa1f02).value
me.txtpadpa1f02.text = .cells(indiceregistro, colpadpa1f02).valueme.txtdatapa1f03.text = .cells(indiceregistro, coldatapa1f03).value
me.txthorapa1f03.text = .cells(indiceregistro, colhorapa1f03).value
me.txtpaspa1f03.text = .cells(indiceregistro, colpaspa1f03).value
me.txtpadpa1f03.text = .cells(indiceregistro, colpadpa1f03).valueme.txtdatapa1f04.text = .cells(indiceregistro, coldatapa1f04).value
me.txthorapa1f04.text = .cells(indiceregistro, colhorapa1f04).value
me.txtpaspa1f04.text = .cells(indiceregistro, colpaspa1f04).value
me.txtpadpa1f04.text = .cells(indiceregistro, colpadpa1f04).valueme.txtdatapa1f05.text = .cells(indiceregistro, coldatapa1f05).value
me.txthorapa1f05.text = .cells(indiceregistro, colhorapa1f05).value
me.txtpaspa1f05.text = .cells(indiceregistro, colpaspa1f05).value
me.txtpadpa1f05.text = .cells(indiceregistro, colpadpa1f05).valueme.txtdatapa1f06.text = .cells(indiceregistro, coldatapa1f06).value
me.txthorapa1f06.text = .cells(indiceregistro, colhorapa1f06).value
me.txtpaspa1f06.text = .cells(indiceregistro, colpaspa1f06).value
me.txtpadpa1f06.text = .cells(indiceregistro, colpadpa1f06).valueme.txtdatapa1f07.text = .cells(indiceregistro, coldatapa1f07).value
me.txthorapa1f07.text = .cells(indiceregistro, colhorapa1f07).value
me.txtpaspa1f07.text = .cells(indiceregistro, colpaspa1f07).value
me.txtpadpa1f07.text = .cells(indiceregistro, colpadpa1f07).value‘pressão arterial fase 2
me.txtdatapa2f01.text = .cells(indiceregistro, coldatapa2f01).value
me.txthorapa2f01.text = .cells(indiceregistro, colhorapa2f01).value
me.txtpaspa2f01.text = .cells(indiceregistro, colpaspa2f01).value
me.txtpadpa2f01.text = .cells(indiceregistro, colpadpa2f01).valueme.txtdatapa2f02.text = .cells(indiceregistro, coldatapa2f02).value
me.txthorapa2f02.text = .cells(indiceregistro, colhorapa2f02).value
me.txtpaspa2f02.text = .cells(indiceregistro, colpaspa2f02).value
me.txtpadpa2f02.text = .cells(indiceregistro, colpadpa2f02).valueme.txtdatapa2f03.text = .cells(indiceregistro, coldatapa2f03).value
me.txthorapa2f03.text = .cells(indiceregistro, colhorapa2f03).value
me.txtpaspa2f03.text = .cells(indiceregistro, colpaspa2f03).value
me.txtpadpa2f03.text = .cells(indiceregistro, colpadpa2f03).valueme.txtdatapa2f04.text = .cells(indiceregistro, coldatapa2f04).value
me.txthorapa2f04.text = .cells(indiceregistro, colhorapa2f04).value
me.txtpaspa2f04.text = .cells(indiceregistro, colpaspa2f04).value
me.txtpadpa2f04.text = .cells(indiceregistro, colpadpa2f04).valueme.txtdatapa2f05.text = .cells(indiceregistro, coldatapa2f05).value
me.txthorapa2f05.text = .cells(indiceregistro, colhorapa2f05).value
me.txtpaspa2f05.text = .cells(indiceregistro, colpaspa2f05).value
me.txtpadpa2f05.text = .cells(indiceregistro, colpadpa2f05).valueme.txtdatapa2f06.text = .cells(indiceregistro, coldatapa2f06).value
me.txthorapa2f06.text = .cells(indiceregistro, colhorapa2f06).value
me.txtpaspa2f06.text = .cells(indiceregistro, colpaspa2f06).value
me.txtpadpa2f06.text = .cells(indiceregistro, colpadpa2f06).valueme.txtdatapa2f07.text = .cells(indiceregistro, coldatapa2f07).value
me.txthorapa2f07.text = .cells(indiceregistro, colhorapa2f07).value
me.txtpaspa2f07.text = .cells(indiceregistro, colpaspa2f07).value
me.txtpadpa2f07.text = .cells(indiceregistro, colpadpa2f07).value‘dados laboratoriais
me.txtdatadadoslab1.text = .cells(indiceregistro, coldatadadoslab1).value
me.txthba1cdadoslab1.text = .cells(indiceregistro, colhba1cdadoslab1).value
me.txtglicjjdadoslab1.text = .cells(indiceregistro, colglicjjdadoslab1).value
me.txtcoltdadoslab1.text = .cells(indiceregistro, colcoltdadoslab1).value
me.txttgdadoslab1.text = .cells(indiceregistro, coltgdadoslab1).value
me.txtldlcdadoslab1.text = .cells(indiceregistro, colldlcdadoslab1).value
me.txthdlcdadoslab1.text = .cells(indiceregistro, colhdlcdadoslab1).valueme.txtdatadadoslab2.text = .cells(indiceregistro, coldatadadoslab2).value
me.txthba1cdadoslab2.text = .cells(indiceregistro, colhba1cdadoslab2).value
me.txtglicjjdadoslab2.text = .cells(indiceregistro, colglicjjdadoslab2).value
me.txtcoltdadoslab2.text = .cells(indiceregistro, colcoltdadoslab2).value
me.txttgdadoslab2.text = .cells(indiceregistro, coltgdadoslab2).value
me.txtldlcdadoslab2.text = .cells(indiceregistro, colldlcdadoslab2).value
me.txthdlcdadoslab2.text = .cells(indiceregistro, colhdlcdadoslab2).valueme.txtdatadadoslab3.text = .cells(indiceregistro, coldatadadoslab3).value
me.txthba1cdadoslab3.text = .cells(indiceregistro, colhba1cdadoslab3).value
me.txtglicjjdadoslab3.text = .cells(indiceregistro, colglicjjdadoslab3).value
me.txtcoltdadoslab3.text = .cells(indiceregistro, colcoltdadoslab3).value
me.txttgdadoslab3.text = .cells(indiceregistro, coltgdadoslab3).value
me.txtldlcdadoslab3.text = .cells(indiceregistro, colldlcdadoslab3).value
me.txthdlcdadoslab3.text = .cells(indiceregistro, colhdlcdadoslab3).valueme.txtdatadadoslab4.text = .cells(indiceregistro, coldatadadoslab4).value
me.txthba1cdadoslab4.text = .cells(indiceregistro, colhba1cdadoslab4).value
me.txtglicjjdadoslab4.text = .cells(indiceregistro, colglicjjdadoslab4).value
me.txtcoltdadoslab4.text = .cells(indiceregistro, colcoltdadoslab4).value
me.txttgdadoslab4.text = .cells(indiceregistro, coltgdadoslab4).value
me.txtldlcdadoslab4.text = .cells(indiceregistro, colldlcdadoslab4).value
me.txthdlcdadoslab4.text = .cells(indiceregistro, colhdlcdadoslab5).valueme.txtdatadadoslab5.text = .cells(indiceregistro, coldatadadoslab5).value
me.txthba1cdadoslab5.text = .cells(indiceregistro, colhba1cdadoslab5).value
me.txtglicjjdadoslab5.text = .cells(indiceregistro, colglicjjdadoslab5).value
me.txtcoltdadoslab5.text = .cells(indiceregistro, colcoltdadoslab5).value
me.txttgdadoslab5.text = .cells(indiceregistro, coltgdadoslab5).value
me.txtldlcdadoslab5.text = .cells(indiceregistro, colldlcdadoslab5).value
me.txthdlcdadoslab5.text = .cells(indiceregistro, colhdlcdadoslab5).valueme.txtdatadadoslab6.text = .cells(indiceregistro, coldatadadoslab6).value
me.txthba1cdadoslab6.text = .cells(indiceregistro, colhba1cdadoslab6).value
me.txtglicjjdadoslab6.text = .cells(indiceregistro, colglicjjdadoslab6).value
me.txtcoltdadoslab6.text = .cells(indiceregistro, colcoltdadoslab6).value
me.txttgdadoslab6.text = .cells(indiceregistro, coltgdadoslab6).value
me.txtldlcdadoslab6.text = .cells(indiceregistro, colldlcdadoslab6).value
me.txthdlcdadoslab6.text = .cells(indiceregistro, colhdlcdadoslab6).value‘problemas de saúde
me.txtinicio1infops1.text = .cells(indiceregistro, colinicio1infops1).value
me.txt1infopsinfbasps1.text = .cells(indiceregistro, col1infopsinfbasps1).value
me.txtinicio1infops2.text = .cells(indiceregistro, colinicio1infops2).value
me.txt1infopspreexpps1.text = .cells(indiceregistro, col1infopspreexpps1).valueme.txtinicio2infops1.text = .cells(indiceregistro, colinicio2infops1).value
me.txt2infopsinfbasps1.text = .cells(indiceregistro, col2infopsinfbasps1).value
me.txtinicio2infops2.text = .cells(indiceregistro, colinicio2infops2).value
me.txt2infopspreexpps1.text = .cells(indiceregistro, col2infopspreexpps1).valueme.txtinicio3infops1.text = .cells(indiceregistro, colinicio3infops1).value
me.txt3infopsinfbasps1.text = .cells(indiceregistro, col3infopsinfbasps1).value
me.txtinicio3infops2.text = .cells(indiceregistro, colinicio3infops2).value
me.txt3infopspreexpps1.text = .cells(indiceregistro, col3infopspreexpps1).valueme.txtinicio4infops1.text = .cells(indiceregistro, colinicio4infops1).value
me.txt4infopsinfbasps1.text = .cells(indiceregistro, col4infopsinfbasps1).value
me.txtinicio4infops2.text = .cells(indiceregistro, colinicio4infops2).value
me.txt4infopspreexpps1.text = .cells(indiceregistro, col4infopspreexpps1).valueme.txtinicio5infops1.text = .cells(indiceregistro, colinicio5infops1).value
me.txt5infopsinfbasps1.text = .cells(indiceregistro, col5infopsinfbasps1).value
me.txtinicio5infops2.text = .cells(indiceregistro, colinicio5infops2).value
me.txt5infopspreexpps1.text = .cells(indiceregistro, col5infopspreexpps1).valueme.txtinicio6infops1.text = .cells(indiceregistro, colinicio6infops1).value
me.txt6infopsinfbasps1.text = .cells(indiceregistro, col6infopsinfbasps1).value
me.txtinicio6infops2.text = .cells(indiceregistro, colinicio6infops2).value
me.txt6infopspreexpps1.text = .cells(indiceregistro, col6infopspreexpps1).value‘medicamentos em uso
me.txtmed01medicamento1.text = .cells(indiceregistro, colmed01medicamento1).value
me.txtmed01subsativa1.text = .cells(indiceregistro, colmed01subsativa1).value
me.txtmed01usopara1.text = .cells(indiceregistro, colmed01usopara1).value
me.txtmed01posprescrita1.text = .cells(indiceregistro, colmed01posprescrita1).value
me.txtmed01posusada1.text = .cells(indiceregistro, colmed01posusada1).value
me.txtmed01medico1.text = .cells(indiceregistro, colmed01medico1).value
me.txtmed01crm1.text = .cells(indiceregistro, colmed01crm1).value
me.txtmed01uf1.text = .cells(indiceregistro, colmed01uf1).value
me.txtmed01melhor1.text = .cells(indiceregistro, colmed01melhor1).value
me.txtmed01algestranho1.text = .cells(indiceregistro, colmed01algestranho1).value
me.txtmed01datainicio1.text = .cells(indiceregistro, colmed01datainicio1).value
me.txtmed01datafim1.text = .cells(indiceregistro, colmed01datafim1).value
me.txtmed01modousaadm1.text = .cells(indiceregistro, colmed01modousaadm1).value
me.txtmed01obs1.text = .cells(indiceregistro, colmed01obs1).value‘histórico do paciente
me.txthistorico1.text = .cells(indiceregistro, colhistorico1).value‘observações à considerar
me.txtobsconsiderar1.text = .cells(indiceregistro, colobsconsiderar1).valueend if
end withcall atualizaregistrocorrente
end subpublic sub carregaregistroporindice(byval indice as long)
‘carrega os dados do registro baseado no índice
indiceregistro = indicecall carregaregistro
end subprivate sub atualizararquivo(byval readonly as boolean)
dim caminhocompleto as string
‘fecha o arquivo de dados e tenta abrí-lo
‘guarda o caminho
caminhocompleto = wbcadastro.fullname
wbcadastro.saved = true
wbcadastro.close savechanges:=false‘abre o arquivo em modo escrita
set wbcadastro = workbooks.open(filename:=caminhocompleto, readonly:=readonly)‘oculta a janela
wbcadastro.windows(1).visible = false‘reatribui a planilha de cadastro
set wscadastro = wbcadastro.worksheets(nomeplanilhacadastro)
end subprivate sub salvaregistro(byval id as long, byval indice as long)
‘tenta abrir o arquivo em modo escrita
call atualizararquivo(false)with wscadastro
.cells(indice, colcodigodopaciente).value = id
.cells(indice, colnomedopaciente).value = me.txtnomepaciente.text
.cells(indice, colidade).value = me.txtidade.text
.cells(indice, colsexo).value = me.txtsexo.text
.cells(indice, colnomedoconsultor).value = me.txtnomeconsultor.text
.cells(indice, colregistro).value = me.txtregistro.text
.cells(indice, colendereco).value = me.txtendereco.text
.cells(indice, colnumero).value = me.txtnumero.text
.cells(indice, colbairro).value = me.txtbairro.text
.cells(indice, colcidade).value = me.txtcidade.text
.cells(indice, colregiao).value = me.txtregiao.text
.cells(indice, colcep).value = me.txtcep.text
.cells(indice, colpais).value = me.txtpais.text
.cells(indice, coltelefone).value = me.txttelefone.text
.cells(indice, colcelular).value = me.txtcelular.text
.cells(indice, colemail).value = me.txtemail.text‘parametros do paciente
.cells(indice, coldatadaantropometria1).value = me.txtdataantropometria1.text
.cells(indice, colpeso1).value = me.txtpesoantropometria1.text
.cells(indice, colaltura1).value = me.txtalturaantropometria1.text
.cells(indice, colimc1).value = me.txtimcantropometria1.text
.cells(indice, colcintura1).value = me.txtcinturaantropometria1.text
.cells(indice, colquadril1).value = me.txtquadrilantropometria1.text
.cells(indice, colicq1).value = me.txticqantropometria1.text.cells(indice, coldatadaantropometria2).value = me.txtdataantropometria2.text
.cells(indice, colpeso2).value = me.txtpesoantropometria2.text
.cells(indice, colaltura2).value = me.txtalturaantropometria2.text
.cells(indice, colimc2).value = me.txtimcantropometria2.text
.cells(indice, colcintura2).value = me.txtcinturaantropometria2.text
.cells(indice, colquadril2).value = me.txtquadrilantropometria2.text
.cells(indice, colicq2).value = me.txticqantropometria2.text.cells(indice, coldatadaantropometria3).value = me.txtdataantropometria3.text
.cells(indice, colpeso3).value = me.txtpesoantropometria3.text
.cells(indice, colaltura3).value = me.txtalturaantropometria3.text
.cells(indice, colimc3).value = me.txtimcantropometria3.text
.cells(indice, colcintura3).value = me.txtcinturaantropometria3.text
.cells(indice, colquadril3).value = me.txtquadrilantropometria3.text
.cells(indice, colicq3).value = me.txticqantropometria3.text.cells(indice, coldatadaantropometria4).value = me.txtdataantropometria4.text
.cells(indice, colpeso4).value = me.txtpesoantropometria4.text
.cells(indice, colaltura4).value = me.txtalturaantropometria4.text
.cells(indice, colimc4).value = me.txtimcantropometria4.text
.cells(indice, colcintura4).value = me.txtcinturaantropometria4.text
.cells(indice, colquadril4).value = me.txtquadrilantropometria4.text
.cells(indice, colicq4).value = me.txticqantropometria4.text.cells(indice, coldatadaantropometria5).value = me.txtdataantropometria5.text
.cells(indice, colpeso5).value = me.txtpesoantropometria5.text
.cells(indice, colaltura5).value = me.txtalturaantropometria5.text
.cells(indice, colimc5).value = me.txtimcantropometria5.text
.cells(indice, colcintura5).value = me.txtcinturaantropometria5.text
.cells(indice, colquadril5).value = me.txtquadrilantropometria5.text
.cells(indice, colicq5).value = me.txticqantropometria5.text.cells(indice, coldatadaantropometria6).value = me.txtdataantropometria6.text
.cells(indice, colpeso6).value = me.txtpesoantropometria6.text
.cells(indice, colaltura6).value = me.txtalturaantropometria6.text
.cells(indice, colimc6).value = me.txtimcantropometria6.text
.cells(indice, colcintura6).value = me.txtcinturaantropometria6.text
.cells(indice, colquadril6).value = me.txtquadrilantropometria6.text
.cells(indice, colicq6).value = me.txticqantropometria6.text.cells(indice, coldatadaantropometria7).value = me.txtdataantropometria7.text
.cells(indice, colpeso7).value = me.txtpesoantropometria7.text
.cells(indice, colaltura7).value = me.txtalturaantropometria7.text
.cells(indice, colimc7).value = me.txtimcantropometria7.text
.cells(indice, colcintura7).value = me.txtcinturaantropometria7.text
.cells(indice, colquadril7).value = me.txtquadrilantropometria7.text
.cells(indice, colicq7).value = me.txticqantropometria7.text‘glicemia capilar fase 1
.cells(indice, colglicemia1f01).value = me.txtglicemia1f01.text
.cells(indice, coljejum1f01).value = me.txtjejum1f01.text
.cells(indice, colposjejum1f01).value = me.txtposjejum1f01.text.cells(indice, colglicemia1f02).value = me.txtglicemia1f02.text
.cells(indice, coljejum1f02).value = me.txtjejum1f02.text
.cells(indice, colposjejum1f02).value = me.txtposjejum1f02.text.cells(indice, colglicemia1f03).value = me.txtglicemia1f03.text
.cells(indice, coljejum1f03).value = me.txtjejum1f03.text
.cells(indice, colposjejum1f03).value = me.txtposjejum1f03.text.cells(indice, colglicemia1f04).value = me.txtglicemia1f04.text
.cells(indice, coljejum1f04).value = me.txtjejum1f04.text
.cells(indice, colposjejum1f04).value = me.txtposjejum1f04.text.cells(indice, colglicemia1f05).value = me.txtglicemia1f05.text
.cells(indice, coljejum1f05).value = me.txtjejum1f05.text
.cells(indice, colposjejum1f05).value = me.txtposjejum1f05.text.cells(indice, colglicemia1f06).value = me.txtglicemia1f06.text
.cells(indice, coljejum1f06).value = me.txtjejum1f06.text
.cells(indice, colposjejum1f06).value = me.txtposjejum1f06.text.cells(indice, colglicemia1f07).value = me.txtglicemia1f07.text
.cells(indice, coljejum1f07).value = me.txtjejum1f07.text
.cells(indice, colposjejum1f07).value = me.txtposjejum1f07.text‘glicemia capilar fase 2
.cells(indice, colglicemia2f01).value = me.txtglicemia2f01.text
.cells(indice, coljejum2f01).value = me.txtjejum2f01.text
.cells(indice, colposjejum2f01).value = me.txtposjejum2f01.text.cells(indice, colglicemia2f02).value = me.txtglicemia2f02.text
.cells(indice, coljejum2f02).value = me.txtjejum2f02.text
.cells(indice, colposjejum2f02).value = me.txtposjejum2f02.text.cells(indice, colglicemia2f03).value = me.txtglicemia2f03.text
.cells(indice, coljejum2f03).value = me.txtjejum2f03.text
.cells(indice, colposjejum2f03).value = me.txtposjejum2f03.text.cells(indice, colglicemia2f04).value = me.txtglicemia2f04.text
.cells(indice, coljejum2f04).value = me.txtjejum2f04.text
.cells(indice, colposjejum2f04).value = me.txtposjejum2f04.text.cells(indice, colglicemia2f05).value = me.txtglicemia2f05.text
.cells(indice, coljejum2f05).value = me.txtjejum2f05.text
.cells(indice, colposjejum2f05).value = me.txtposjejum2f05.text.cells(indice, colglicemia2f06).value = me.txtglicemia2f06.text
.cells(indice, coljejum2f06).value = me.txtjejum2f06.text
.cells(indice, colposjejum2f06).value = me.txtposjejum2f06.text.cells(indice, colglicemia2f07).value = me.txtglicemia2f07.text
.cells(indice, coljejum2f07).value = me.txtjejum2f07.text
.cells(indice, colposjejum2f07).value = me.txtposjejum2f07.text‘pressão arterial fase 1
.cells(indice, coldatapa1f01).value = me.txtdatapa1f01.text
.cells(indice, colhorapa1f01).value = me.txthorapa1f01.text
.cells(indice, colpaspa1f01).value = me.txtpaspa1f01.text
.cells(indice, colpadpa1f01).value = me.txtpadpa1f01.text.cells(indice, coldatapa1f02).value = me.txtdatapa1f02.text
.cells(indice, colhorapa1f02).value = me.txthorapa1f02.text
.cells(indice, colpaspa1f02).value = me.txtpaspa1f02.text
.cells(indice, colpadpa1f02).value = me.txtpadpa1f02.text.cells(indice, coldatapa1f03).value = me.txtdatapa1f03.text
.cells(indice, colhorapa1f03).value = me.txthorapa1f03.text
.cells(indice, colpaspa1f03).value = me.txtpaspa1f03.text
.cells(indice, colpadpa1f03).value = me.txtpadpa1f03.text.cells(indice, coldatapa1f04).value = me.txtdatapa1f04.text
.cells(indice, colhorapa1f04).value = me.txthorapa1f04.text
.cells(indice, colpaspa1f04).value = me.txtpaspa1f04.text
.cells(indice, colpadpa1f04).value = me.txtpadpa1f04.text.cells(indice, coldatapa1f05).value = me.txtdatapa1f05.text
.cells(indice, colhorapa1f05).value = me.txthorapa1f05.text
.cells(indice, colpaspa1f05).value = me.txtpaspa1f05.text
.cells(indice, colpadpa1f05).value = me.txtpadpa1f05.text.cells(indice, coldatapa1f06).value = me.txtdatapa1f06.text
.cells(indice, colhorapa1f06).value = me.txthorapa1f06.text
.cells(indice, colpaspa1f06).value = me.txtpaspa1f06.text
.cells(indice, colpadpa1f06).value = me.txtpadpa1f06.text.cells(indice, coldatapa1f07).value = me.txtdatapa1f07.text
.cells(indice, colhorapa1f07).value = me.txthorapa1f07.text
.cells(indice, colpaspa1f07).value = me.txtpaspa1f07.text
.cells(indice, colpadpa1f07).value = me.txtpadpa1f07.text‘pressão arterial fase 2
.cells(indice, coldatapa2f01).value = me.txtdatapa2f01.text
.cells(indice, colhorapa2f01).value = me.txthorapa2f01.text
.cells(indice, colpaspa2f01).value = me.txtpaspa2f01.text
.cells(indice, colpadpa2f01).value = me.txtpadpa2f01.text.cells(indice, coldatapa2f02).value = me.txtdatapa2f02.text
.cells(indice, colhorapa2f02).value = me.txthorapa2f02.text
.cells(indice, colpaspa2f02).value = me.txtpaspa2f02.text
.cells(indice, colpadpa2f02).value = me.txtpadpa2f02.text.cells(indice, coldatapa2f03).value = me.txtdatapa2f03.text
.cells(indice, colhorapa2f03).value = me.txthorapa2f03.text
.cells(indice, colpaspa2f03).value = me.txtpaspa2f03.text
.cells(indice, colpadpa2f03).value = me.txtpadpa2f03.text.cells(indice, coldatapa2f04).value = me.txtdatapa2f04.text
.cells(indice, colhorapa2f04).value = me.txthorapa2f04.text
.cells(indice, colpaspa2f04).value = me.txtpaspa2f04.text
.cells(indice, colpadpa2f04).value = me.txtpadpa2f04.text.cells(indice, coldatapa2f05).value = me.txtdatapa2f05.text
.cells(indice, colhorapa2f05).value = me.txthorapa2f05.text
.cells(indice, colpaspa2f05).value = me.txtpaspa2f05.text
.cells(indice, colpadpa2f05).value = me.txtpadpa2f05.text.cells(indice, coldatapa2f06).value = me.txtdatapa2f06.text
.cells(indice, colhorapa2f06).value = me.txthorapa2f06.text
.cells(indice, colpaspa2f06).value = me.txtpaspa2f06.text
.cells(indice, colpadpa2f06).value = me.txtpadpa2f06.text.cells(indice, coldatapa2f07).value = me.txtdatapa2f07.text
.cells(indice, colhorapa2f07).value = me.txthorapa2f07.text
.cells(indice, colpaspa2f07).value = me.txtpaspa2f07.text
.cells(indice, colpadpa2f07).value = me.txtpadpa2f07.text‘dados loratoriais
.cells(indice, coldatadadoslab1).value = me.txtdatadadoslab1.text
.cells(indice, colhba1cdadoslab1).value = me.txthba1cdadoslab1.text
.cells(indice, colglicjjdadoslab1).value = me.txtglicjjdadoslab1.text
.cells(indice, colcoltdadoslab1).value = me.txtcoltdadoslab1.text
.cells(indice, coltgdadoslab1).value = me.txttgdadoslab1.text
.cells(indice, colldlcdadoslab1).value = me.txtldlcdadoslab1.text
.cells(indice, colhdlcdadoslab1).value = me.txthdlcdadoslab1.text.cells(indice, coldatadadoslab2).value = me.txtdatadadoslab2.text
.cells(indice, colhba1cdadoslab2).value = me.txthba1cdadoslab2.text
.cells(indice, colglicjjdadoslab2).value = me.txtglicjjdadoslab2.text
.cells(indice, colcoltdadoslab2).value = me.txtcoltdadoslab2.text
.cells(indice, coltgdadoslab2).value = me.txttgdadoslab2.text
.cells(indice, colldlcdadoslab2).value = me.txtldlcdadoslab2.text
.cells(indice, colhdlcdadoslab2).value = me.txthdlcdadoslab2.text.cells(indice, coldatadadoslab3).value = me.txtdatadadoslab3.text
.cells(indice, colhba1cdadoslab3).value = me.txthba1cdadoslab3.text
.cells(indice, colglicjjdadoslab3).value = me.txtglicjjdadoslab3.text
.cells(indice, colcoltdadoslab3).value = me.txtcoltdadoslab3.text
.cells(indice, coltgdadoslab3).value = me.txttgdadoslab3.text
.cells(indice, colldlcdadoslab3).value = me.txtldlcdadoslab3.text
.cells(indice, colhdlcdadoslab3).value = me.txthdlcdadoslab3.text.cells(indice, coldatadadoslab4).value = me.txtdatadadoslab4.text
.cells(indice, colhba1cdadoslab4).value = me.txthba1cdadoslab4.text
.cells(indice, colglicjjdadoslab4).value = me.txtglicjjdadoslab4.text
.cells(indice, colcoltdadoslab4).value = me.txtcoltdadoslab4.text
.cells(indice, coltgdadoslab4).value = me.txttgdadoslab4.text
.cells(indice, colldlcdadoslab4).value = me.txtldlcdadoslab4.text
.cells(indice, colhdlcdadoslab4).value = me.txthdlcdadoslab4.text.cells(indice, coldatadadoslab5).value = me.txtdatadadoslab5.text
.cells(indice, colhba1cdadoslab5).value = me.txthba1cdadoslab5.text
.cells(indice, colglicjjdadoslab5).value = me.txtglicjjdadoslab5.text
.cells(indice, colcoltdadoslab5).value = me.txtcoltdadoslab5.text
.cells(indice, coltgdadoslab5).value = me.txttgdadoslab5.text
.cells(indice, colldlcdadoslab5).value = me.txtldlcdadoslab5.text
.cells(indice, colhdlcdadoslab5).value = me.txthdlcdadoslab5.text.cells(indice, coldatadadoslab6).value = me.txtdatadadoslab6.text
.cells(indice, colhba1cdadoslab6).value = me.txthba1cdadoslab6.text
.cells(indice, colglicjjdadoslab6).value = me.txtglicjjdadoslab6.text
.cells(indice, colcoltdadoslab6).value = me.txtcoltdadoslab6.text
.cells(indice, coltgdadoslab6).value = me.txttgdadoslab6.text
.cells(indice, colldlcdadoslab6).value = me.txtldlcdadoslab6.text
.cells(indice, colhdlcdadoslab6).value = me.txthdlcdadoslab6.text‘problemas de saúde
.cells(indice, colinicio1infops1).value = me.txtinicio1infops1.text
.cells(indice, col1infopsinfbasps1).value = me.txt1infopsinfbasps1.text
.cells(indice, colinicio1infops2).value = me.txtinicio1infops2.text
.cells(indice, col1infopspreexpps1).value = me.txt1infopspreexpps1.text.cells(indice, colinicio2infops1).value = me.txtinicio2infops1.text
.cells(indice, col2infopsinfbasps1).value = me.txt2infopsinfbasps1.text
.cells(indice, colinicio2infops2).value = me.txtinicio2infops2.text
.cells(indice, col2infopspreexpps1).value = me.txt2infopspreexpps1.text.cells(indice, colinicio3infops1).value = me.txtinicio3infops1.text
.cells(indice, col3infopsinfbasps1).value = me.txt3infopsinfbasps1.text
.cells(indice, colinicio3infops2).value = me.txtinicio3infops2.text
.cells(indice, col3infopspreexpps1).value = me.txt3infopspreexpps1.text.cells(indice, colinicio4infops1).value = me.txtinicio4infops1.text
.cells(indice, col4infopsinfbasps1).value = me.txt4infopsinfbasps1.text
.cells(indice, colinicio4infops2).value = me.txtinicio4infops2.text
.cells(indice, col4infopspreexpps1).value = me.txt4infopspreexpps1.text.cells(indice, colinicio5infops1).value = me.txtinicio5infops1.text
.cells(indice, col5infopsinfbasps1).value = me.txt5infopsinfbasps1.text
.cells(indice, colinicio5infops2).value = me.txtinicio5infops2.text
.cells(indice, col5infopspreexpps1).value = me.txt5infopspreexpps1.text.cells(indice, colinicio6infops1).value = me.txtinicio6infops1.text
.cells(indice, col6infopsinfbasps1).value = me.txt6infopsinfbasps1.text
.cells(indice, colinicio6infops2).value = me.txtinicio6infops2.text
.cells(indice, col6infopspreexpps1).value = me.txt6infopspreexpps1.text‘medicamentos em uso
.cells(indice, colmed01medicamento1).value = me.txtmed01medicamento1.text
.cells(indice, colmed01subsativa1).value = me.txtmed01subsativa1.text
.cells(indice, colmed01usopara1).value = me.txtmed01usopara1.text
.cells(indice, colmed01posprescrita1).value = me.txtmed01posprescrita1.text
.cells(indice, colmed01posusada1).value = me.txtmed01posusada1.text
.cells(indice, colmed01medico1).value = me.txtmed01medico1.text
.cells(indice, colmed01crm1).value = me.txtmed01crm1.text
.cells(indice, colmed01uf1).value = me.txtmed01uf1.text
.cells(indice, colmed01melhor1).value = me.txtmed01melhor1.text
.cells(indice, colmed01algestranho1).value = me.txtmed01algestranho1.text
.cells(indice, colmed01datainicio1).value = me.txtmed01datainicio1.text
.cells(indice, colmed01datafim1).value = me.txtmed01datafim1.text
.cells(indice, colmed01modousaadm1).value = me.txtmed01modousaadm1.text
.cells(indice, colmed01obs1).value = me.txtmed01obs1.text.cells(indice, colmed02medicamento1).value = me.txtmed02medicamento1.text
.cells(indice, colmed02subsativa1).value = me.txtmed02subsativa1.text
.cells(indice, colmed02usopara1).value = me.txtmed02usopara1.text
.cells(indice, colmed02posprescrita1).value = me.txtmed02posprescrita1.text
.cells(indice, colmed02posusada1).value = me.txtmed02posusada1.text
.cells(indice, colmed02medico1).value = me.txtmed02medico1.text
.cells(indice, colmed02crm1).value = me.txtmed02crm1.text
.cells(indice, colmed02uf1).value = me.txtmed02uf1.text
.cells(indice, colmed02melhor1).value = me.txtmed02melhor1.text
.cells(indice, colmed02algestranho1).value = me.txtmed02algestranho1.text
.cells(indice, colmed02datainicio1).value = me.txtmed02datainicio1.text
.cells(indice, colmed02datafim1).value = me.txtmed02datafim1.text
.cells(indice, colmed02modousaadm1).value = me.txtmed02modousaadm1.text
.cells(indice, colmed02obs1).value = me.txtmed02obs1.text.cells(indice, colmed03medicamento1).value = me.txtmed03medicamento1.text
.cells(indice, colmed03subsativa1).value = me.txtmed03subsativa1.text
.cells(indice, colmed03usopara1).value = me.txtmed03usopara1.text
.cells(indice, colmed03posprescrita1).value = me.txtmed03posprescrita1.text
.cells(indice, colmed03posusada1).value = me.txtmed03posusada1.text
.cells(indice, colmed03medico1).value = me.txtmed03medico1.text
.cells(indice, colmed03crm1).value = me.txtmed03crm1.text
.cells(indice, colmed03uf1).value = me.txtmed03uf1.text
.cells(indice, colmed03melhor1).value = me.txtmed03melhor1.text
.cells(indice, colmed03algestranho1).value = me.txtmed03algestranho1.text
.cells(indice, colmed03datainicio1).value = me.txtmed03datainicio1.text
.cells(indice, colmed03datafim1).value = me.txtmed03datafim1.text
.cells(indice, colmed03modousaadm1).value = me.txtmed03modousaadm1.text
.cells(indice, colmed03obs1).value = me.txtmed03obs1.text.cells(indice, colmed04medicamento1).value = me.txtmed04medicamento1.text
.cells(indice, colmed04subsativa1).value = me.txtmed04subsativa1.text
.cells(indice, colmed04usopara1).value = me.txtmed04usopara1.text
.cells(indice, colmed04posprescrita1).value = me.txtmed04posprescrita1.text
.cells(indice, colmed04posusada1).value = me.txtmed04posusada1.text
.cells(indice, colmed04medico1).value = me.txtmed04medico1.text
.cells(indice, colmed04crm1).value = me.txtmed04crm1.text
.cells(indice, colmed04uf1).value = me.txtmed04uf1.text
.cells(indice, colmed04melhor1).value = me.txtmed04melhor1.text
.cells(indice, colmed04algestranho1).value = me.txtmed04algestranho1.text
.cells(indice, colmed04datainicio1).value = me.txtmed04datainicio1.text
.cells(indice, colmed04datafim1).value = me.txtmed04datafim1.text
.cells(indice, colmed04modousaadm1).value = me.txtmed04modousaadm1.text
.cells(indice, colmed04obs1).value = me.txtmed04obs1.text.cells(indice, colmed05medicamento1).value = me.txtmed05medicamento1.text
.cells(indice, colmed05subsativa1).value = me.txtmed05subsativa1.text
.cells(indice, colmed05usopara1).value = me.txtmed05usopara1.text
.cells(indice, colmed05posprescrita1).value = me.txtmed05posprescrita1.text
.cells(indice, colmed05posusada1).value = me.txtmed05posusada1.text
.cells(indice, colmed05medico1).value = me.txtmed05medico1.text
.cells(indice, colmed05crm1).value = me.txtmed05crm1.text
.cells(indice, colmed05uf1).value = me.txtmed05uf1.text
.cells(indice, colmed05melhor1).value = me.txtmed05melhor1.text
.cells(indice, colmed05algestranho1).value = me.txtmed05algestranho1.text
.cells(indice, colmed05datainicio1).value = me.txtmed05datainicio1.text
.cells(indice, colmed05datafim1).value = me.txtmed05datafim1.text
.cells(indice, colmed05modousaadm1).value = me.txtmed05modousaadm1.text
.cells(indice, colmed05obs1).value = me.txtmed05obs1.text.cells(indice, colmed06medicamento1).value = me.txtmed06medicamento1.text
.cells(indice, colmed06subsativa1).value = me.txtmed06subsativa1.text
.cells(indice, colmed06usopara1).value = me.txtmed06usopara1.text
.cells(indice, colmed06posprescrita1).value = me.txtmed06posprescrita1.text
.cells(indice, colmed06posusada1).value = me.txtmed06posusada1.text
.cells(indice, colmed06medico1).value = me.txtmed06medico1.text
.cells(indice, colmed06crm1).value = me.txtmed06crm1.text
.cells(indice, colmed06uf1).value = me.txtmed06uf1.text
.cells(indice, colmed06melhor1).value = me.txtmed06melhor1.text
.cells(indice, colmed06algestranho1).value = me.txtmed06algestranho1.text
.cells(indice, colmed06datainicio1).value = me.txtmed06datainicio1.text
.cells(indice, colmed06datafim1).value = me.txtmed06datafim1.text
.cells(indice, colmed06modousaadm1).value = me.txtmed06modousaadm1.text
.cells(indice, colmed06obs1).value = me.txtmed06obs1.text.cells(indice, colmed07medicamento1).value = me.txtmed07medicamento1.text
.cells(indice, colmed07subsativa1).value = me.txtmed07subsativa1.text
.cells(indice, colmed07usopara1).value = me.txtmed07usopara1.text
.cells(indice, colmed07posprescrita1).value = me.txtmed07posprescrita1.text
.cells(indice, colmed07posusada1).value = me.txtmed07posusada1.text
.cells(indice, colmed07medico1).value = me.txtmed07medico1.text
.cells(indice, colmed07crm1).value = me.txtmed07crm1.text
.cells(indice, colmed07uf1).value = me.txtmed07uf1.text
.cells(indice, colmed07melhor1).value = me.txtmed07melhor1.text
.cells(indice, colmed07algestranho1).value = me.txtmed07algestranho1.text
.cells(indice, colmed07datainicio1).value = me.txtmed07datainicio1.text
.cells(indice, colmed07datafim1).value = me.txtmed07datafim1.text
.cells(indice, colmed07modousaadm1).value = me.txtmed07modousaadm1.text
.cells(indice, colmed07obs1).value = me.txtmed07obs1.text‘historico do paciente
.cells(indice, colhistorico1).value = me.txthistorico1.text‘observações à considerar
.cells(indice, colobsconsiderar1).value = me.txtobsconsiderar1.textend with
‘salva o arquivo
call wbcadastro.save‘abre o arquivo novamente em modo leitura
call atualizararquivo(true)call atualizaregistrocorrente
end subprivate function pegaproximoid() as long
dim rangeids as range
‘pega o range que se refere a toda a coluna do código (id)
set rangeids = wscadastro.range(wscadastro.cells(indiceminimo, colcodigodopaciente), wscadastro.cells(wscadastro.usedrange.rows.count, colcodigodopaciente))
pegaproximoid = worksheetfunction.max(rangeids) + 1
end functionprivate sub atualizaregistrocorrente()
lblnavigator.caption = indiceregistro – 1 & ” de ” & wscadastro.usedrange.rows.count – 1
lblmensagem.caption = “”
end subprivate sub limpacontroles()
me.txtcodigopacien -
3 de Dezembro de 2011 às 2:13 #1756AnónimoInactivo
se alguém tiver uma solução por favor meu e-mail é : imachinecorporation@yahoo.com.br
-
3 de Dezembro de 2011 às 3:24 #1757jorgerodAdministrador
boas,
efectuaste o debug do teu código? mostra alguma linha onde poderá estar o erro?
sabes, é bastante difíclil verificar o potencial erro, perante a quantidade de código que apresentas.
achas que podes anexar a planilha, para podermos ver melhor o que eventualmente pode estar a provocar o erro, ou é privada e não podes?
diz qualquer coisa, ok?
-
3 de Dezembro de 2011 às 18:02 #1758AnónimoInactivo
[attachment]c:fakepathcadastro cofarma avaliação.rar[/attachment]
olá sr. jorgerodsegue meu projeto como solicitado…
desde já, muito grato pela força…
imachinecorporation@yahoo.com.br
[attachment]c:fakepathcadastro cofarma avaliação.rar[/attachment]
não consigo inserir aqui, poderia me fornecer um email para que eu possa enviar o arquivo
-
3 de Dezembro de 2011 às 21:19 #826jorgerodAdministrador
-
-
AutorArtigos
- Tem de iniciar sessão para responder a este tópico.