SHARE
TWEET

Untitled

a guest Dec 6th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub UserForm_Initialize()
  2.     '------------------------------Wczytywanie dat o 11 dni wcześniej------------------------------
  3.     Dim dt As Date
  4.     For dt = Date - 10 To Date Step 1
  5.         ComboBox1.AddItem Format(dt, "yyyy-mm-dd") 'dodawanie sformatowanych dat do comboboxa
  6.     Next dt
  7.    
  8.     ComboBox1 = Format(Date, "yyyy-mm-dd")
  9.    
  10.     '------------------------------Wczytywanie z arkusza------------------------------
  11.     Dim x As Integer
  12.     Dim WS As Object
  13.    
  14.     Set WS = ThisWorkbook.Sheets("S")
  15.    
  16.     '------------------------------Pętla wczytująca nazwiska z arkusza------------------------------
  17.     x = 2
  18.     Do While CStr(WS.Cells(x, 1)) <> ""
  19.         ComboBox2.AddItem CStr(WS.Cells(x, 1))
  20.         x = x + 1
  21.     Loop
  22.    
  23.     '------------------------------Pętla wczytująca przedmioty z arkusza------------------------------
  24.     x = 2
  25.     Do While CStr(WS.Cells(x, 2)) <> ""
  26.         ComboBox3.AddItem CStr(WS.Cells(x, 2))
  27.         x = x + 1
  28.     Loop
  29.    
  30.     '------------------------------Pętla wczytująca oceny z arkusza------------------------------
  31.     x = 2
  32.     Do While CStr(WS.Cells(x, 3)) <> ""
  33.         ComboBox4.AddItem CStr(WS.Cells(x, 3))
  34.         x = x + 1
  35.     Loop
  36.    
  37.    
  38.    
  39. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top