[belajar-excel] Link ribbon tak berfungsi [1 Attachment]

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[belajar-excel] Link ribbon tak berfungsi [1 Attachment]

Milis Belajar Excel mailing list
Assalamualaikum..
Mohon bantuan para master sekalian..
Saya punya file yg menggunakan link ribbon.awal mula link-nya bisa
dijalankan tapi ketika saya memberikan script VBA di module,link ribbon yg
semula bisa jadi tidak bisa..script VBA-ny sbb:
Public Sub Percobaanku(NamaSheet As String)
Dim sh As Worksheet
Application.ScreenUpdating = False
    Sheets(NamaSheet).Visible = 1
For Each sh In ThisWorkbook.Worksheets
    If Not sh.Name = NamaSheet Then
        sh.Visible = 2
    End If
Next sh
Application.ScreenUpdating = True
End Sub
Sub Auto_Open()
Dim sh As Worksheet


Percobaanku "DATA"
Application.ScreenUpdating = False


    For Each sh In ThisWorkbook.Worksheets
        If sh.Name <> "awas" Then
            sh.Protect Rahasia
        End If
    Next sh
Application.ScreenUpdating = True


End Sub
Sub Auto_Close()
Dim sh As Worksheet


Application.ScreenUpdating = False
    For Each sh In ThisWorkbook.Worksheets
        If sh.Name <> "awas" Then
            sh.Unprotect Rahasia
        End If
    Next






    Percobaanku "awas"
    ThisWorkbook.Save
    Application.DisplayAlerts = False
Application.ScreenUpdating = True
ThisWorkbook.Close
End Sub
Untuk lebih jelasnya file terlampir..
Atas bantuan para master sekalian saya sampaikan terimakasih

PERCOBAANKU.xlsm (30K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [belajar-excel] Link ribbon tak berfungsi

Milis Belajar Excel mailing list
Wasalamualaikum warahmatullah.

bagaimana kalau VBA miliknya ribbon diganti begini:

Sub coba(ribbon As IRibbonControl)
     Sheet4.Visible = xlSheetVisible
     Sheet1.Visible = xlSheetVeryHidden
     Sheet2.Visible = xlSheetVeryHidden
     Sheet3.Visible = xlSheetVeryHidden
End Sub
Sub DATA(ribbon As IRibbonControl)
     Sheet2.Visible = xlSheetVisible
     Sheet1.Visible = xlSheetVeryHidden
     Sheet3.Visible = xlSheetVeryHidden
     Sheet4.Visible = xlSheetVeryHidden
End Sub
Sub siswa(ribbon As IRibbonControl)
     Sheet3.Visible = xlSheetVisible
     Sheet1.Visible = xlSheetVeryHidden
     Sheet2.Visible = xlSheetVeryHidden
     Sheet4.Visible = xlSheetVeryHidden
End Sub


atau dapat diganti begini:

Sub coba(ribbon As IRibbonControl)
Dim w As Worksheet
     Sheet4.Visible = xlSheetVisible
For Each w In Worksheets
If w.Name <> "COBA" Then
w.Visible = xlSheetVeryHidden
End If
Next w
End Sub

salam, selamat mencoba

Nang agus


On 09/05/17 09.21, farud oke [hidden email] [belajar-excel] wrote:

>
> Assalamualaikum..
> Mohon bantuan para master sekalian..
> Saya punya file yg menggunakan link ribbon.awal mula link-nya bisa
> dijalankan tapi ketika saya memberikan script VBA di module,link
> ribbon yg semula bisa jadi tidak bisa..script VBA-ny sbb:
> Public Sub Percobaanku(NamaSheet As String)
> Dim sh As Worksheet
> Application.ScreenUpdating = False
>     Sheets(NamaSheet).Visible = 1
> For Each sh In ThisWorkbook.Worksheets
>     If Not sh.Name = NamaSheet Then
>         sh.Visible = 2
>     End If
> Next sh
> Application.ScreenUpdating = True
> End Sub
> Sub Auto_Open()
> Dim sh As Worksheet
>
> Percobaanku "DATA"
> Application.ScreenUpdating = False
>
>     For Each sh In ThisWorkbook.Worksheets
>         If sh.Name <> "awas" Then
>             sh.Protect Rahasia
>         End If
>     Next sh
> Application.ScreenUpdating = True
>
> End Sub
> Sub Auto_Close()
> Dim sh As Worksheet
>
> Application.ScreenUpdating = False
>     For Each sh In ThisWorkbook.Worksheets
>         If sh.Name <> "awas" Then
>             sh.Unprotect Rahasia
>         End If
>     Next
>
>
>
>     Percobaanku "awas"
>     ThisWorkbook.Save
>     Application.DisplayAlerts = False
> Application.ScreenUpdating = True
> ThisWorkbook.Close
> End Sub
> Untuk lebih jelasnya file terlampir..
> Atas bantuan para master sekalian saya sampaikan terimakasih
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [belajar-excel] Link ribbon tak berfungsi

Milis Belajar Excel mailing list
Terimakasih mas agus atas jawabannya..
Sudah sesuai dg harapan mas..
Oiya mas..satu lagi,trus terang kode vba saya itu hasil googling sana sini
dimana ketika membuka file otomatis file itu terkunci sendiri mas.agar
tidak serta merta otomatis mengunci bagian mana dari kode vba itu yg hrus
ditambah atau dihapus mas..
Atas bimbingannya saya sampaikan terimakasih


Pada tanggal 9 Mei 2017 2.50 PM, "nangagus [hidden email]
[belajar-excel]" <[hidden email]> menulis:


>
>
> Wasalamualaikum warahmatullah.
>
> bagaimana kalau VBA miliknya ribbon diganti begini:
>
> Sub coba(ribbon As IRibbonControl)
>     Sheet4.Visible = xlSheetVisible
>     Sheet1.Visible = xlSheetVeryHidden
>     Sheet2.Visible = xlSheetVeryHidden
>     Sheet3.Visible = xlSheetVeryHidden
> End Sub
> Sub DATA(ribbon As IRibbonControl)
>     Sheet2.Visible = xlSheetVisible
>     Sheet1.Visible = xlSheetVeryHidden
>     Sheet3.Visible = xlSheetVeryHidden
>     Sheet4.Visible = xlSheetVeryHidden
> End Sub
> Sub siswa(ribbon As IRibbonControl)
>     Sheet3.Visible = xlSheetVisible
>     Sheet1.Visible = xlSheetVeryHidden
>     Sheet2.Visible = xlSheetVeryHidden
>     Sheet4.Visible = xlSheetVeryHidden
> End Sub
>
>
> atau dapat diganti begini:
>
> Sub coba(ribbon As IRibbonControl)
> Dim w As Worksheet
>     Sheet4.Visible = xlSheetVisible
> For Each w In Worksheets
> If w.Name <> "COBA" Then
> w.Visible = xlSheetVeryHidden
> End If
> Next w
> End Sub
>
> salam, selamat mencoba
>
> Nang agus
>
> On 09/05/17 09.21, farud oke [hidden email] [belajar-excel] wrote:
>
>
>
> Assalamualaikum..
> Mohon bantuan para master sekalian..
> Saya punya file yg menggunakan link ribbon.awal mula link-nya bisa
> dijalankan tapi ketika saya memberikan script VBA di module,link ribbon yg
> semula bisa jadi tidak bisa..script VBA-ny sbb:
> Public Sub Percobaanku(NamaSheet As String)
> Dim sh As Worksheet
> Application.ScreenUpdating = False
>     Sheets(NamaSheet).Visible = 1
> For Each sh In ThisWorkbook.Worksheets
>     If Not sh.Name = NamaSheet Then
>         sh.Visible = 2
>     End If
> Next sh
> Application.ScreenUpdating = True
> End Sub
> Sub Auto_Open()
> Dim sh As Worksheet
>
> Percobaanku "DATA"
> Application.ScreenUpdating = False
>
>     For Each sh In ThisWorkbook.Worksheets
>         If sh.Name <> "awas" Then
>             sh.Protect Rahasia
>         End If
>     Next sh
> Application.ScreenUpdating = True
>
> End Sub
> Sub Auto_Close()
> Dim sh As Worksheet
>
> Application.ScreenUpdating = False
>     For Each sh In ThisWorkbook.Worksheets
>         If sh.Name <> "awas" Then
>             sh.Unprotect Rahasia
>         End If
>     Next
>
>
>
>     Percobaanku "awas"
>     ThisWorkbook.Save
>     Application.DisplayAlerts = False
> Application.ScreenUpdating = True
> ThisWorkbook.Close
> End Sub
> Untuk lebih jelasnya file terlampir..
> Atas bantuan para master sekalian saya sampaikan terimakasih
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [belajar-excel] Link ribbon tak berfungsi

Milis Belajar Excel mailing list
Asalamualaikum warahmatullah

Dear Farud.

Jika memprotect sheet sebaiknya menggunakan userInterfaceOnly = true,
jika dipilih ini berarti kita dapat mengubah, mengisi dan menghapus cell
yang terprotect menggunakan VBA, tetapi cell tersebut tidak dapat diubah
manual karena terprotect.

Pembacaan excel untuk cekrip anda sbb:

For Each sh In ThisWorkbook.Worksheets 'untuk setiap sheet dalam semua
sheets tolong di chek satu persatu
         If sh.Name <> "awas" Then ' jika sheet yang diperiksa bernama
"awas" maka:
             sh.Protect Rahasia 'sheet tersebut di kunci dengan password
yang disimpan dalam variabel Rahasia
         End If 'batas akhir Jika
     Next sh ' chek sheet berikutnya sampai sheet akhir
Application.ScreenUpdating = True ' dalam melaksanakan perintah saya
jangan ditampakkan di layar yaa!

Selamat belajar semoga sukses, (saya sudah belajar menggunakan excel 20
tahun ternyata tetap masih belum mahir menggunakan excel)

On 09/05/17 15.47, farud oke [hidden email] [belajar-excel] wrote:

>
> Terimakasih mas agus atas jawabannya..
> Sudah sesuai dg harapan mas..
> Oiya mas..satu lagi,trus terang kode vba saya itu hasil googling sana
> sini dimana ketika membuka file otomatis file itu terkunci sendiri
> mas.agar tidak serta merta otomatis mengunci bagian mana dari kode vba
> itu yg hrus ditambah atau dihapus mas..
> Atas bimbingannya saya sampaikan terimakasih
>
>
> ------------------------------------------------------------------------
> Posted by: farud oke <[hidden email]>
> ------------------------------------------------------------------------
> Reply via web post
> <https://groups.yahoo.com/neo/groups/belajar-excel/conversations/messages/42137;_ylc=X3oDMTJyZW40ZHY4BF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0MjEzNwRzZWMDZnRyBHNsawNycGx5BHN0aW1lAzE0OTQzMjA0ODk-?act=reply&messageNum=42137>
> • Reply to sender
> <mailto:[hidden email]?subject=Re%3A%20%5Bbelajar-excel%5D%20Link%20ribbon%20tak%20berfungsi>
> • Reply to group
> <mailto:[hidden email]?subject=Re%3A%20%5Bbelajar-excel%5D%20Link%20ribbon%20tak%20berfungsi>
> • Start a New Topic
> <https://groups.yahoo.com/neo/groups/belajar-excel/conversations/newtopic;_ylc=X3oDMTJmbWhxOXUyBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzE0OTQzMjA0ODk->
> • Messages in this topic
> <https://groups.yahoo.com/neo/groups/belajar-excel/conversations/topics/42133;_ylc=X3oDMTM3cDFvajllBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRtc2dJZAM0MjEzNwRzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzE0OTQzMjA0ODkEdHBjSWQDNDIxMzM->
> (3)
>
> ------------------------------------------------------------------------
> Have you tried the highest rated email app? <https://yho.com/1wwmgg>
> With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated
> email app on the market. What are you waiting for? Now you can access
> all your inboxes (Gmail, Outlook, AOL and more) in one place. Never
> delete an email again with 1000GB of free cloud storage.
> ------------------------------------------------------------------------
> ============================================================
> Pojok Lowongan Kerja yang disediakan milis :
> http://milis-belajar-excel.1048464.n5.nabble.com/Pojok-Lowongan-Kerja-f5725753.html
> *** Posting lowongan kerja : ke link tersebut dan klik New Topic
> ============================================================
> bergabung ke milis (subscribe), kirim mail kosong ke:
> [hidden email]
> posting ke milis, kirimkan ke: [hidden email]
> berkunjung ke web milis :
> http://tech.groups.yahoo.com/group/belajar-excel/messages
> melihat file archive / mendownload lampiran :
> http://www.mail-archive.com/belajar-excel@.../
> atau (sejak 25-Apr-2011) bisa juga di :
> http://milis-belajar-excel.1048464.n5.nabble.com/
> menghubungi moderators & owners: [hidden email]
> keluar dari membership milis (UnSubscribe), kirim mail kosong ke :
> [hidden email]
> ---------------------------------------------------------------------
> Visit Your Group
> <https://groups.yahoo.com/neo/groups/belajar-excel/info;_ylc=X3oDMTJmN2tsc2JhBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE0OTQzMjA0ODk->
>
>
>   * New Members
>     <https://groups.yahoo.com/neo/groups/belajar-excel/members/all;_ylc=X3oDMTJnMGdpcTRmBF9TAzk3MzU5NzE0BGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxNDk0MzIwNDg5>
>     7
>
> Yahoo! Groups
> <https://groups.yahoo.com/neo;_ylc=X3oDMTJlNTNvYjVjBF9TAzk3NDc2NTkwBGdycElkAzIwNjI3Njc4BGdycHNwSWQDMTcwODI5ODgyMQRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTQ5NDMyMDQ4OQ-->
>
> • Privacy
> <https://info.yahoo.com/privacy/us/yahoo/groups/details.html> •
> Unsubscribe
> <mailto:[hidden email]?subject=Unsubscribe>
> • Terms of Use <https://info.yahoo.com/legal/us/yahoo/utos/terms/>
>
> .
>
>

Loading...