Button ile dinamik ribbon

Katılım
22 Temmuz 2014
Mesajlar
42
Excel Vers. ve Dili
Excel 2007
Merhabalar,
Excelde ribbon(kendi sekmeni olusturma) uygulamasi yapmaya calisiyorum ve ribbondaki buttona tiklanildiginda otomatik olarak ribbon`a checkbox eklemek istiyorum.
Yardimci olursaniz cok tesekkur ederim iyi calismalar.
 
Katılım
22 Temmuz 2014
Mesajlar
42
Excel Vers. ve Dili
Excel 2007
Mesajiniz icin tesekkur ederim ama aradigim bu degil.
Benim istedigim ribbondaki bir tusa basarak bir checkbox yaratmak
cok tesekkurler
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,160
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Bunu ne amaçla kullanacaksınız. Belki farklı çözümler sunabiliriz.
 
Katılım
22 Temmuz 2014
Mesajlar
42
Excel Vers. ve Dili
Excel 2007
Merhabalar mesajiniz icin cok tesekkurler,
Bu xml kodu kullandigim buttonun : <button id="customButton5" label="Add Model" size="large" onAction="Button19_Click" imageMso="TableStyleClear" />

Bu da buttonun icinde yapilanlar ( Ozetle TextBox1 degerine girilen deger sayfada varsa o degerin yanina yeni bir bos sutun ekliyor yoksa sayfanin ilk bos kismina sutun ekliyor)

Private Sub CommandButton1_Click()
Dim lastcolumn As Long, lastrow As Long
Dim i As Integer
Dim foundcell As Range, myRange As Range, lastcell As Range, foundrange As Range
Dim firstfound As String
Dim fnd As String
Set myRange = ActiveSheet.UsedRange
Set lastcell = myRange.Cells(myRange.Cells.Count)
fnd = TextBox1.Value
Set foundcell = myRange.Find(what:=fnd, after:=lastcell)
lastcolumn = Cells(2, Columns.Count).End(xlToLeft).Column
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
If foundcell Is Nothing Then
With ActiveSheet

.Cells(2, lastcolumn).EntireColumn.Copy
.Cells(1, lastcolumn + 1).PasteSpecial
.Cells(1, lastcolumn + 1).EntireColumn.ClearContents
.Cells(2, lastcolumn + 1).Value = TextBox1.Value
.Cells(3, lastcolumn + 1).Value = TextBox2.Value
.Cells(4, lastcolumn + 1).Value = TextBox3.Value
.Cells(5, lastcolumn + 1).Value = TextBox4.Value
.Cells(6, lastcolumn + 1).Value = ComboBox1.Value
.Cells(7, lastcolumn + 1).Value = TextBox5.Value
.Cells(8, lastcolumn + 1).Value = .Cells(8, lastcolumn) + 1
.Cells(9, lastcolumn + 1).Value = TextBox6.Value
.Cells(10, lastcolumn + 1).Value = TextBox7.Value
.Cells(11, lastcolumn + 1).Value = ComboBox2.Value
.Cells(12, lastcolumn + 1).Value = TextBox8.Value

.Cells(1, "G").EntireColumn.Insert
.Cells(11, "G").Value = TextBox1.Value
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Cells(lastrow, "A").Copy
.Cells(lastrow + 2, "A").PasteSpecial
.Cells(lastrow + 1, "A").Value = "BASISWERT " + TextBox1.Value
.Cells(lastrow + 2, "A").Value = TextBox9.Value
End With
Else
Set foundrange = foundcell
foundrange.Offset(0, 1).EntireColumn.Insert
foundrange.Offset(0, 1).Cells(1).Value = TextBox1.Value
foundrange.Offset(0, 1).Cells(2).Value = TextBox2.Value
foundrange.Offset(0, 1).Cells(3).Value = TextBox3.Value
foundrange.Offset(0, 1).Cells(4).Value = TextBox4.Value
foundrange.Offset(0, 1).Cells(5).Value = ComboBox1.Value
foundrange.Offset(0, 1).Cells(6).Value = TextBox5.Value

foundrange.Offset(0, 1).Cells(8).Value = TextBox6.Value
foundrange.Offset(0, 1).Cells(9).Value = TextBox7.Value
foundrange.Offset(0, 1).Cells(10).Value = ComboBox2.Value
foundrange.Offset(0, 1).Cells(11).Value = TextBox8.Value
End If
End Sub



Benim istedigim,deger sayfada yoksa ribbona TextBox1.value idsinde ve isminde yeni bir checkbox eklemek...
Yardiminiz icin cok tesekkur ederim simdiden
 
Üst