Please advise how to Display Part of Excel on VBA Form
I have range of data in A1:F10
While running a macro how to display selected ranges of cells in an userform as a pop-up (Say selected data is A1:C10)
Please do the needful
Thanks
Govind
http://forum.chandoo.org/threads/already-used-vba-code-stopped-working-worksheets-i-select-false.31045/
Dear Hui,
The issue is with the selection of all sheets. In the above post the issue was stated. Suddenly Worksheets(i).Select (False) stopped working, i have googled this issue and many...
For i = 0 To Sheets.Count - 1
If Left(Sheets(i + 1).Name, 4) <> "SKIP" Then 'Set criteria here
ReDim Preserve ShtArr(UBound(ShtArr, 1) + 1)
ShtArr(UBound(ShtArr, 1)) = Sheets(i + 1).Name
End If
Next
Sheets(ShtArr()).Select
Is there is any way to use as it above
But i'm getting...
Hi Chihiro,
Thanks for your help. I tried this code but same issue exists from yesterday
Please help
Sub Test()
Dim ws As Worksheet
ForEach ws In ThisWorkbook.Worksheets
ws.SelectFalse
Next
EndSub
regards
Govind
Dear Hui,
Sub Select_Sheets()
For i = 1 To Sheets.Count
If Left(Worksheets(i).Name, 4) <> "Skip"Then
Worksheets(i).Select (False)
EndIf
Next
EndSub
This code suddenly stopped working
Please help
Regards
Govind
Dear All,
I was using this code for long time as advised by Hui, suddenly it stopped working in MS Excel 2013
For i = 1 To Sheets.Count
Worksheets(i).Select (False)
Next
The above code is not selecting all the sheets
Please do the needful
Regards
Govind
Dear Hui,
Thanks for you reply...
Yes agreed.
Initially i did the code with manual entry/ assignment of value to the array as shown in first post as i was not aware of the code further the value keep on changes...
Now it made it easy
Your reply is additional tips for me"edit the array in VBA...
Dear All
Need the VBA code with arrays in the below manner.
Dim pnum(0 To 10000) As Variant
pnum(1) = 2
pnum(2) = 64
pnum(3) = 126
pnum(4) = 188
pnum(5) = 250
pnum(6) = 312
pnum(7) = 374
pnum(8) = 436
pnum(9) = 498
pnum(10) = 560
10 different numbers has to be stored in an array
This data is...
Dear Luke,
The code is perfect and solved the issue
In the mean time i have used the below code. But your code is professional and i'm using it now!
Public Sub RENAMEINDEX()
X = Rnd()
Sheets("INDEX").Name = "INDEX" & X
ActiveSheet.Name = "INDEX"
End Sub
Dear Like,
Thank you for your reply.
Sheet3 get renamed to anyname.
Shall we go with RND function? or any other way out with reasonable name?
Regards
Govind
Dear All,
We have several sheets in a workbook
Requirement is i will switchover to any sheets, Whichever is my current worksheet need to be RENAMED as "INDEX" is the query
So if i switch to say worksheet 3 then worksheet 3 will be renamed as INDEX after running a macro. If i move to say...
This is working for me. Thanks
Dim ws As Worksheet
Dim SelectedSheets() As String
Dim n As Long, i As Long
n = 1
For Each ws In ActiveWindow.SelectedSheets
ReDim Preserve SelectedSheets(n)
SelectedSheets(n) = ws.Name
n = n + 1
Next
For i = 1...
Dear All,
Please advise the code for storing the selected sheet names into an array
so that it is possible to loop through ONLY the selected sheets but one sheet at a time
Regards
Govind
Dear All
I'm able to select all sheets by the code
ActiveWorkbook.Sheets.Select
Once after selecting all sheets how to deselect the particular sheets with the sheet names starting with SKIP
Please advise
Regards
Govind
Dear Luke,
Sorry the code i have posted is only protecting the structure, i found that after posting this reply
I need to protect the workbook with password
BELOW CODE IS PERFECTLY ALRIGHT
THANK YOU LUKE!
Sub ChangePass()
Dim newPass As String
Dim checkPass As String
Dim wb As Workbook...
Dear All,
There are many worksheets currently open
Say 5 sheets are open
All are already password protected to open it, but it is open
Password is known
How to change the old password to new one and SAVE and close it so that while opening it will be supplied with new passwords
Any codes...