macro starten van in het begin én van verderop

littlepete

Well-known Member
Joined
Mar 26, 2015
Messages
503
Office Version
  1. 365
Platform
  1. Windows
hallo vba'er :)

mijn macro datumfilter werkt op zich goed.
ik probeer nu dezelfde macro datumfilter ook te starten in de auto_open macro, met dat verschil dat de valuable keuze reeds bepaald is op 9, waar
in de (volledige) macro datumfilter eerst twee vragen gesteld worden met als mogelijk antwoord 0 t.e.m. 9.

wat moet ik toevoegen om te zorgen dat de valuable keuze (=9) gelezen wordt door de macro (zonder de voorafgaande vragen te stellen) ?
en hoe ga ik van auto_open naar deel twee in de macro datumfilter?

ik probeer al opsplitsen in twee aparte macro's en "goto", of "call". ik probeer al te werken met valuables als boolean...
ik krijg steeds foutmeldingen...
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
dit is wat ik probeer:
sub auto_open
...
keuze=9 (vastleggen keuze als antwoord omdat de vragen in de volgende macro worden overgeslagen)
slaover=true (aanduiden dat de volgende macro niet van in het begin moet worden uitgevoerd)
...
end sub
sub datumfilter
if slaover=true then goto datumfilter2
(...)
datumfilter2:
(vervolg van de macro zonder vragen te stellen)

helaas leest excel de ingevulde waarde van keuze (die 9 is) niet... waarom niet? wat moet ik veranderen?

bedankt voor de hulp :) !
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,306
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top