Monday, October 16, 2017

Excel dropdowns from arrays in a protected worksheet where only the cells fixed for dropdown is allowed to change in VBA,VBA Teacher Sourav,Kolkata 09748184075

Private Sub Workbook_Open()
Sheets("Sheet1").Select



Application.Calculation = xlManual

Call calldropdown

On Error Resume Next
ActiveSheet.Protect Password:="0000"



End Sub




Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ws As Worksheet
Dim inputRange As Range


Set ws = Worksheets("Sheet1")
'tell this sub to unprotect only these cells
Set inputRange = Range("G1,I1,M1,O1")


' If the selected cell is not in the range keep the sheet locked
If Intersect(Target, inputRange) Is Nothing Then
'else unprotect the sheet by providing password
'(same as the one that was used to protect this sheet)
Else

    ws.Unprotect Password:="0000"
    Target.Locked = False
    ws.Protect Password:="0000"

End If
End Sub


Sub dropdown(pos As String, ByRef valdropdown() As String)
'
' Macro1 Macro
'

'


Set ws = Worksheets("Sheet1")
ws.Select

  
   
Range(pos).Select
ws.Unprotect Password:="0000"
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:=Join(valdropdown, ",")
       
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With
   
   
    ws.Protect Password:="0000"
End Sub

Sub testarr()
 Dim valG1() As String
 valG1 = Split("A, B, C", ",")

 testarr2 valG1

End Sub

Sub testarr2(ByRef valG1() As String)
MsgBox (UBound(valG1))

End Sub


Sub calldropdown()

Sheets("Sheet1").Select

Dim valG1() As String
 valG1 = Split("A, B, C", ",")
 Dim valI1() As String
 valI1 = Split("L, M, N", ",")
 Dim valM1() As String
 valM1 = Split("X, Y, Z", ",")
 Dim valO1() As String
 valO1 = Split("1, 2, 3", ",")



Call dropdown("G1", valG1)

Call dropdown("I1", valI1)
Call dropdown("M1", valM1)
Call dropdown("O1", valO1)



End Sub



Reset your vba project password,VBA Teacher Sourav,Kolkata 09748184075


https://www.youtube.com/watch?v=Lpt-DbXPPJc



Follow the steps in this video

Tuesday, August 29, 2017

transaction-check-error-in-installing-vim solved,linux faculty Sourav,Kolkata 09748184075

yum update vim-minimal

yum install vim


source:https://unix.stackexchange.com/questions/119310/transaction-check-error-in-installing-vim

Enable and disable hyper v on windows 8.1 so that hyper v,visual studio 2013 phone sdk and vmware can be used properly ,IT Faculty Sourav Bhattacharya,Kolkata 09748184075

From an elevated command prompt:

bcdedit /set hypervisorlaunchtype off
to disable hypervisor, and:

bcdedit /set hypervisorlaunchtype auto
to reenable it (default value).

Of course it still requires restart.

Source:https://superuser.com/questions/540055/convenient-way-to-enable-disable-hyper-v-in-windows-8

DVD Drive not detected in windows 8.1 solved,IT Faculty Sourav Bhattacharya,Kolkata 09748184075

For the these steps solved the issue

To remove and reinstall IDE/ATAPI driver, follow these steps:

From Start, search for Device Manager. Open Device Manager from the search results, and select the View menu. Choose Show Hidden Devices.
Expand IDE/ATAPI Controllers, and then:
Select and right-click ATA Channel 0, and then click Uninstall
Select and right-click ATA Channel 1, and then click Uninstall
Select and right-click Standard Dual Channel PCI IDE Controller, and then click Uninstall
If there are additional entries, right-click them and then choose Uninstall
Reboot the device.
After the computer restarts, the drivers will be automatically installed.

If your problem is not solved, try the next method.

source:https://support.microsoft.com/en-in/help/314060/your-cd-or-dvd-drive-is-not-recognized-by-windows-or-other-programs