Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Vergeet de link uit de vorige post: VB is echt wat anders dan VBA. In Office werken we met VBA:
Code:sub opslaan_met_datum_en_tijd() Activedocument.SaveAs "naam" & format(date,"yyyymmdd;hh:mm") & ".doc" End Sub
Vergeet de link uit de vorige post: VB is echt wat anders dan VBA. In Office werken we met VBA:
Code:sub opslaan_met_datum_en_tijd() Activedocument.SaveAs "naam" & format(date,"yyyymmdd;hh:mm") & ".doc" End Sub
Bedankt, ik ben al een stuk verder. Alleen tijd krijg ik er nog niet achter. Heeft iemand nog suggesties
Sub opslaan_met_datum_en_tijd()
ActiveDocument.SaveAs "naam" & Format(Date, "d-mmmm-yyyy-h") & ".doc"
End Sub
Sub DemoData()
Range("A1").Select
ActiveCell.FormulaR1C1 = "11"
Range("A2").Select
ActiveCell.FormulaR1C1 = "22"
Range("A3").Select
ActiveCell.FormulaR1C1 = "33"
Range("B1").Select
ActiveCell.FormulaR1C1 = "teacher 1"
Range("B2").Select
ActiveCell.FormulaR1C1 = "teacher 2"
Range("B3").Select
ActiveCell.FormulaR1C1 = "teacher 3"
Range("E1").Select
ActiveCell.FormulaR1C1 = "11"
Range("E2").Select
ActiveCell.FormulaR1C1 = "33"
Range("E3").Select
ActiveCell.FormulaR1C1 = "22"
Range("E4").Select
ActiveCell.FormulaR1C1 = "22"
Range("E5").Select
ActiveCell.FormulaR1C1 = "33"
Range("E6").Select
ActiveCell.FormulaR1C1 = "33"
Range("E7").Select
ActiveCell.FormulaR1C1 = "11"
Range("E8").Select
ActiveCell.FormulaR1C1 = "22"
Range("E9").Select
ActiveCell.FormulaR1C1 = "33"
Range("F1").Select
ActiveCell.FormulaR1C1 = "student 1"
Range("F2").Select
ActiveCell.FormulaR1C1 = "student 2"
Range("F3").Select
ActiveCell.FormulaR1C1 = "student 3"
Range("F4").Select
ActiveCell.FormulaR1C1 = "student 4"
Range("F5").Select
ActiveCell.FormulaR1C1 = "Student 5"
Range("F6").Select
ActiveCell.FormulaR1C1 = "student 6"
Range("F7").Select
ActiveCell.FormulaR1C1 = "student 7"
Range("F8").Select
ActiveCell.FormulaR1C1 = "student 8"
Range("F9").Select
ActiveCell.FormulaR1C1 = "Student 9"
End Sub
Sub anders()
[A1:A3] =worksheetfunction.transpose(split("11|22|33","|"))
[B1:B3] =worksheetfunction.transpose(split("teacher 1|teacher 2|teacher 3","|"))
[E1:E9]=worksheetfunction.transpose(split("11|33|22|22|33|33|11|22|33","|"))
[F1:F9] = WorksheetFunction.Transpose(Split("student " & Join(WorksheetFunction.Transpose([row(1:9)]), "|student "), "|"))
End Sub
Kweenie of dat zo'n zinvolle link is.
Voorbeeld:
in een tutorial wordt de volgende code gebruikt:
Mijn voorkeur:Code:Sub DemoData() Range("A1").Select ActiveCell.FormulaR1C1 = "11" Range("A2").Select ActiveCell.FormulaR1C1 = "22" Range("A3").Select ActiveCell.FormulaR1C1 = "33" Range("B1").Select ActiveCell.FormulaR1C1 = "teacher 1" Range("B2").Select ActiveCell.FormulaR1C1 = "teacher 2" Range("B3").Select ActiveCell.FormulaR1C1 = "teacher 3" Range("E1").Select ActiveCell.FormulaR1C1 = "11" Range("E2").Select ActiveCell.FormulaR1C1 = "33" Range("E3").Select ActiveCell.FormulaR1C1 = "22" Range("E4").Select ActiveCell.FormulaR1C1 = "22" Range("E5").Select ActiveCell.FormulaR1C1 = "33" Range("E6").Select ActiveCell.FormulaR1C1 = "33" Range("E7").Select ActiveCell.FormulaR1C1 = "11" Range("E8").Select ActiveCell.FormulaR1C1 = "22" Range("E9").Select ActiveCell.FormulaR1C1 = "33" Range("F1").Select ActiveCell.FormulaR1C1 = "student 1" Range("F2").Select ActiveCell.FormulaR1C1 = "student 2" Range("F3").Select ActiveCell.FormulaR1C1 = "student 3" Range("F4").Select ActiveCell.FormulaR1C1 = "student 4" Range("F5").Select ActiveCell.FormulaR1C1 = "Student 5" Range("F6").Select ActiveCell.FormulaR1C1 = "student 6" Range("F7").Select ActiveCell.FormulaR1C1 = "student 7" Range("F8").Select ActiveCell.FormulaR1C1 = "student 8" Range("F9").Select ActiveCell.FormulaR1C1 = "Student 9" End Sub
Code:Sub anders() [A1:A3] =worksheetfunction.transpose(split("11|22|33","|")) [B1:B3] =worksheetfunction.transpose(split("teacher 1|teacher 2|teacher 3","|")) [E1:E9]=worksheetfunction.transpose(split("11|33|22|22|33|33|11|22|33","|")) [F1:F9] = WorksheetFunction.Transpose(Split("student " & Join(WorksheetFunction.Transpose([row(1:9)]), "|student "), "|")) End Sub
Sub opslaan_met_datum_en_tijd()
ActiveDocument.SaveAs "naam" & [COLOR="Red"]FormatDateTime(Now) [/COLOR]& ".doc"
End Sub
De oplossing staat in mijn vorige bijdrage.
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.