Sorting A Very Hidden Sheet That Is Not Active
Jan 29, 2007
I have tried to use absolute references (perhaps I didn't do it right) but it didn't work. Below is the code that does work but I need to first make the sheet visible then activate it.
Sub Row_Sort(tmpsheet As String)
' Sort the first 4 columns of the tmpsheet sheet
Dim tmprng As Range
Dim OldActiveSheet As Worksheet
' Activate the desired workbook (in this case Linewkbk)
Workbooks(LineWkbk.Name).Activate
' Save old active sheet
Set OldActiveSheet = ActiveSheet.............
View 9 Replies
ADVERTISEMENT
Mar 2, 2007
I have a button on a sheet that runs a macro to unhide another sheet. That works, but I want the sheet made visible to remain forward. Instead, the button unhides the sheet and the sheet the button is on comes forward again. I am unable to figure how to keep the sheet made visible forward. Here is the macro 'as recorded'.
Sub UnhideSheet1()
Sheet2.Visible = True
End Sub
View 7 Replies
View Related
Apr 11, 2007
The attached sample workbook has a listbox of areas in a userform. The Textbox on the user form is so that the user can edit the Area names in the listbox. The userform functions fine as long as the column that contains the area name is not hidden. What I want to be able to do is edit the Area Names using the Textbox with the area name column hidden.
View 2 Replies
View Related
Feb 3, 2014
I recorded a simple Macro in Excel 2010 to sort data by the first Column, heading "Ref". I have assigned CTRL + e as the keyboard shortcut for this.
My sheet contains a number of hidden rows (as I hide rows when I have finished working on that issue).
When I run the macro, it does sort by the number of Column A, but also, the hidden rows are then shown again.
I realise I could just click on the A-Z sort button to stop this happening, but I really like being able to use keyboard shortcuts, which is why I tried the macro route.
I wondered if it is possible for the macro to ignore hidden rows?
Code:
This is the macro:
Sub SortByRef()
'
' SortByRef Macro
'
' Keyboard Shortcut: Ctrl+Shift+E
[Code]....
View 1 Replies
View Related
May 14, 2014
I currently have the following macro running to set a chart's data values:
Sub C3Quarter12013()
'
' C3Quarter32013 Macro
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Values = _
[Code] ......
When I copy the tab and change some of the data within the cells, I want the macro refer to the chart on the current tab and the values in the current tab - as currently it refers to only "Chart 2" and the values in the tab 'Figure 2 - WE OPH'.
I've tried changing the sheet name to ActiveSheet.name but that doesn't seem to work.
View 4 Replies
View Related
May 6, 2014
I have created an excel worksheet that will provide budgeting and estimating tools for my project managers. All data used to be manual entry and took a good while to complete. I am trying to automate the process with VBA.
I created a UserForm called InfoVerify1. On that form I have TextBox 1 - 10. When the UF opens, the boxes display project information from my worksheet called "Basis of Estimate", also known as Sheet26.
The TextBox1 ControlSource is set to "E4". When I run the macro with Sheet26 active, the proper information fills in. However, when I am on the Start page or any other worksheet and I run the macro, it tries to fill in the text boxes with E4, etc, from the active sheet. I tried changing the ControlSource to "Sheet26,E4" or any combo thereof with only error messages.
how to get it to refer to a cell on a particular worksheet and hold to that worksheet no matter which sheet I am on at the time I run the Userform?
View 3 Replies
View Related
Aug 10, 2008
I have a workbook with a hidden sheet ("Template") and a visible sheet("New Job"). I need code so when cell F1 in "New Job" is populated:
1-the sheet is renamed to the value of F1,
2-a new tab is made (a carbon copy of the hidden sheet "Template")
3-the new tab is named "New Tab" and marked as unhidden.
Public Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Name = Range("F1").Value
End Sub
Function WorksheetExists(SheetName As String, _
Optional WhichBook As Workbook) As Boolean
Dim WB As Workbook
Set WB = IIf(WhichBook Is Nothing, ThisWorkbook, WhichBook)
On Error Resume Next
WorksheetExists = CBool(Len(WB.Worksheets(SheetName).Name) > 0)
End Function..................
View 2 Replies
View Related
Mar 14, 2014
I have this code that first selects a sheet (data) and then imports a csv-fil to the data sheet.
I want to hide the data sheet and the the code doesn't work.
How do I change the import code so that I do not select the sheet?
[Code] ......
I believe it should be something like this: With Sheets("DATA").QueryTables. Add..... but I am not aware of the syntax.
View 1 Replies
View Related
Dec 12, 2013
I have a userform which clones the latest sheet and produces copy of it on the next sheet. The first sheet they will be cloning is the sheet called 'template', I however want this to be hidden since I do not want anybody to modify a sheet which basically serves purpose of a template. And once cloned, it is no longer needed.
On the click of the command button, the macro will create sheet1 taking the info from sheet named 'Template' in the same workbook . And now on the next click of the command button, Sheet 2 is created taking the info from sheet1 and Sheet 3 is created taking the info from Sheet 2 and so on. Here is what I currently have, so how can i modify it in order for my scnerio to work?
To select the last sheet in the workbook
Code:
Sheets(Sheets.Count).Select
To create new sheet
Code:
Sheets(Sheets.Count).Copy After:=Sheets(Sheets.Count)Sheets(Sheets.Count).Name = MyEvent & " " & MySCN & "(" & ThisWorkbook.Sheets.Count - 2 & ")"
View 3 Replies
View Related
May 14, 2014
What I have is a sheet that is copied periodically from some source sheet, and on this sheet is a table. This sheet is called "Onsite Checklist Template" and it's table is titled "Checklist". I also have another sheet called "Loggers and Initial Notes" which has a tabled titled "Record", and then finally a title sheet call "Proj Details".
To clear this intro up - The sheets, in their order, is: "Proj Details", "Loggers and Initial Notes", "Onsite Checklist Template". The tables: "Record" on "Loggers..." and "Checklist" on "Onsite..."
When the user wants to make a new site visit, he/she fills in the requested date and then selects a button on "Proj...". When this button is selected, it copies the table data on "Record" and puts it on "Checklist", then inserts a new worksheet tab, always in the 3rd position (the title is based on the site visit date in which the user entered), which is a copy of "Onsite...". Now we have another sheet with a table called "Checklist1", and upon another new site visit, there will be another worksheet with "Checklist2", and so on.
On the "Onsite..." worksheet, there is a button on it which also gets copied with the worksheet so that every new worksheet has this copied "Checklist ???" and this button. I'm looking for a macro that, when the button is selected, will bounce the active sheet's table "Checklist ???" off of "Record" and make changes as needed.
"Checklist ???" data range is B11:M20 (the header is on row 10); "Record" data range is B29:Q78 (the header is on row 28); Column headers are titled the same, just that "Record" has 4 extra columns, 3 in the middle and 1 on the end. "Checklist ???" columns 1-12 to "Record" columns 1-7, 10-12, 14-15. The search criteria is the 4th column in both tables ("Trk #").
I need the macro to do the following:If it finds a match, then update "Record" as needed with data from "Checklist ???", changing whatever cell is different in the row that contains the matching "Trk #", so long as the cell on "Checklist ???" is populated (i.e, if a cell on the target row of "Record" has a value, but it's blank on "Checklist ???", then "Record" wins; if it's blank on "Record", but populated on "Checklist ???", the Checklist wins. If both populated but different, then Checklist wins.If a "Trk #" exists on "Checklist ???" but is not on "Record" then add the line to "Record" (the 1st empty row, table size remains)I see no need for any "delete" at this time.
My concerns: The last column on record (column #16) is the filtering column for the worksheet copy event and needs to be left alone (it's formulated to produce a "Yes" or "No")I would like the ability to adjust table sizes if needed without modifying the macroThe table rows on "Checklist ???" will not be changed, deleted, or altered in any way by the macro.
View 2 Replies
View Related
Jul 30, 2009
I'm trying to create a copy of the active sheet and then rename the new copied sheet to what's in cell O4, which is a formula (see below) and then paste value cell O4 in B3 of the copied sheet. However, when I run this macro it doesn't seem to like the second line where I am renaming the sheet (run time error '1004').
"O4" =DATE(YEAR($B$3),MONTH($B$3)+1,DAY($B$3))
Sub NewMonth()
ActiveSheet.Copy Before:=Sheets(Sheets.Count)
ActiveSheet.Name = Range("O4").Value
ActiveSheet.Range("O4").Copy
ActiveSheet.Range("B3").PasteSpecial Paste:=xlPasteValues
End Sub
View 9 Replies
View Related
Mar 31, 2008
I would like a macro that will go to a fixed sheet, copy the format, go back to the previous sheet and paste the format. My problems arise going back to the previously activated sheet rather than just a fixed sheet.
View 2 Replies
View Related
Aug 20, 2014
I have a workbook that I want to copy two separate ranges from and then post to two different sheets. Range one on the active sheet from A4:K(no of rows will vary) to sheet Savoury Year, and range two A64:K(no of rows will vary) to Site Services Year. When pasting I want to paste it to the next empty row down.
Copy of workbook attached : Weekly Accounts.xls
View 4 Replies
View Related
Mar 12, 2014
What this code keeps adding the data to the active sheet instead of the specified "Users" sheet:
[Code]......
View 2 Replies
View Related
Oct 2, 2009
I want DELETE the rows that contains 0 (zero or -) in column F (SALDO BRUTO), when I click the Button (Clear). And How I can copy from this sheet to a new sheet in this workbook, but the names of new sheet automatic rename to next date or 2, and next when I click the Button "Copy to New Sheet".
View 2 Replies
View Related
Sep 28, 2013
well , when i save the spread sheet , some rows still hidden condition
i apperaed them , but when exit with save , it will be hidden again
B shift members History list 2013 (1-1-2013) draft.xls
View 5 Replies
View Related
Jun 24, 2014
I have protected a workbook with a hidden sheet. I am trying to save the hidden sheet to a .pdf format.
It works well until I hide the sheet. I see from other post that the .select is a big part of my problem but I'm not sure how to get around it.
View 11 Replies
View Related
Oct 21, 2011
In a sheet I have a two hyperlinks with Sheet4 and Sheet5. when I am clicking on first hyperlink then the sheet4 is opening and when I am clicking on the other hyperlink then sheet5 is opening. But if I hide these two sheets it is not opening,
Is there any way so that hide sheets should be opened? will I have to write code for that?
View 2 Replies
View Related
Dec 6, 2006
way of protecting a very hidden sheet, I will still need to open the sheet myself everytime I use the program. The only person to open this very hidden sheet is myself.
View 9 Replies
View Related
Apr 1, 2009
Sub Wright()
'
' Wright Macro
'
'
ActiveSheet.Shapes("Object 5").Select
Selection.Verb Verb:=xlPrimary
End Sub
What do I need to add to this so that the Macro will run when the sheet is hidden? The Macro runs an Embeded presentation, which I do not want to be visible in the workbook.
View 9 Replies
View Related
Nov 22, 2006
Sheets("Sheet1").Select
Range("A1:B2000").Select
Selection.Copy
Windows("SL Forms.xls").Activate
Sheets("Hidden Sheet").Select
Range("A1:B2000").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone
Sheets("Hidden Sheet").Select
The macro starts on open, opens the workbook with the data to copy, copies and pastes the data into the original workbook. The problem is that "Hidden Sheet" is hidden, so the macro can't see it!
how do I get the macro to use this hidden sheet without keeping it 'un-hidden'?
View 6 Replies
View Related
Mar 10, 2014
I have problem with additional "hidden"(duplicated?) sheets (not by atribute)
This is my excel, created from new fresh file : excel tables.bmp
And this is what i see when i get all sheetnames (with C#, word and some other programs) word-tables.JPG
where A1$ have same value as A1$_4349_inkjet_WZ
I have this problem with some other files but in this one i have 100% confidence that none of sheets is hidden nor very hidden.
I found that 3 proper tables are "System table" and 2 additional are "tables".
[URL] .....
View 1 Replies
View Related
Feb 14, 2014
I have a macro which copy text from a sheet (sheet-1) and paste it into another sheet.
I want sheet-1 to be hidden, or even better, very-hidden, but when I hide sheet-1 the macro run fails. Respons Run-time error '1004'...
Is it a solution around this 'problem' or does sheet-1 always has to be visible ?
View 3 Replies
View Related
Jan 14, 2009
I've written some VB code in Excel 2003 which hides and unhides worksheets dependant upon 'Yes' or 'No' in a named range. This works Ok in Excel 2003, however if I try and use it in Excel 2007 it shows error 'Compile Error in Hidden Sheet'. When I debug it the error 'Compile Error - Method or Data Member Not Found' appears. The code in question is as follows:
View 9 Replies
View Related
Jul 13, 2009
I have placed the code I am using below. It takes values from a hidden sheet (PACTAct) and places them on a visible sheet (Email). The code moves between the two.
It works at the minute by unhiding the PACTAct sheet then at the end re-hiding it. However I don't want the user to see this sheet whilst the vba is running. Is there a way I can simply refer to the worksheet without unhiding it?
View 6 Replies
View Related
Jun 19, 2012
When the sheet is hidden by me in the excel others shouldn't unhide the hidden sheet.
View 5 Replies
View Related
Aug 14, 2012
I have the following code (which works fine when the sheet isn't hidden)
Code:
FinalRow2 = TtlRev.Cells(Rows.Count, 1).End(xlUp).Row
TtlRev.Range("AM6:AO6").Copy
TtlRev.Range(Cells(6, 39), Cells(FinalRow2, 41)).Select
ActiveSheet.Paste
However, I need to hide the sheet, but it doesn't work because you can't use .select on a hidden sheet I believe. Any way of doing this to a hidden sheet?
View 4 Replies
View Related
Feb 28, 2013
Is it possible to have a hidden sheet password protected, so that only I can unhide the sheet ?
View 1 Replies
View Related
Dec 25, 2013
I have below macro for Sheet2 and i have created a button on Sheet1.now whenever i press this button the macro will run and save Sheet2 as PDF file.
The problem is when i hide Sheet2 the macro doesnt work and it gives an error " Invalid procedure call or argument.
how to make this macro run even when the sheets are hidden ?
Sub PDF_Table()
'Sheet2.PageSetup.PrintArea = "$a$1:$x$140" '*****
'*** can remove the above line if sheet areas are already set and will not be altered
With Sheet2.PageSetup
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlPortrait
.Zoom = 60
[code]...
View 2 Replies
View Related
Nov 24, 2006
I have a workbook, wich copies content from an overview sheet to different other sheets. that works fine, but if I try to hide the content-placeholder sheets, I can't copy my content anymore.
here the part where I get the error;
'OldValue contains the name of the "copy to" sheet as a string
Sheets(OldValue).Select
View 9 Replies
View Related