Running Code On A Hidden Sheet
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
ADVERTISEMENT
Aug 25, 2009
I need this code below to work in a macro on a hidden sheet.. FYI the sheet name is "Closed".
View 2 Replies
View Related
Oct 14, 2007
I copied the sheet and redid the format. I renamed the original dashboard sheet from count to "keep" and named the copy after the original "count" Everything still works great - until i either hide or delete the original count which is now named "keep". I get an error at the red colored line below ".publish false".
I have attached an image of the error....
View 7 Replies
View Related
Apr 28, 2009
i have a spread sheet which has a very complex simulaton in it. excel is not the ideal place for it, but it is not possible to port it wholesale to something more sensible. i have modified the code so that it is possible to run two copies of the spread sheet (in two seperate excel processes) at one time. Due to the dual core nature of the machine this has almost no overhead.
I have created a controlling spread sheet that is cabable of launching multiple copies of the simulation and starting the code executing. the problem is the controlling spread sheet always waits for the code to return before it continues, hence it would open two seperate versions of excel, start the first simulation executing and then wait until it completes before starting the next one. is there any way of starting a function in another work book without waiting for the execution to complete?
View 2 Replies
View Related
Sep 29, 2008
I created a macro and saved it into the Personal.xls file and originally the file stayed hidden whenever I ran the macro. I changed a setting somewhere and now when I run the macro the file opens up and stays open until I close it.
How can I have the file stay hidden when I run the macro?
View 9 Replies
View Related
May 12, 2009
I am dealing with several very large spreadsheets using VBA to do various things. I found that my code worked well, but was taking a long time to run. The biggest time consumer was my use of the AutoFilter features. I have since turned calculations to manual before my code runs and set it back to auto when my code is done running. What are the potential consequences of my turning calculations to manual and then back to auto?
View 2 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
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
Jun 10, 2013
I have a row on a tab that I always want to hide before I print or save. Is it possible to get a message to pop up if I try and print the page while row 33 is not hidden?
View 5 Replies
View Related
Mar 25, 2007
I downloaded a cool add-in from XL-Logic that lets you select sheets to print. It's great, except that I need to print very hidden sheets and it does not display very hidden sheets. Does anyone know how to modify this code so it will list all sheet including very hidden sheets? And is there a way to make the sheets appear in alphabetical order? I've tried to play with it, but I don't know enough about VB....
View 9 Replies
View Related
Dec 2, 2008
A spreadsheet that needs a new menu item in a custom menu does not show the custom menu code. Tools-->Customize-->Commands-->Rearrange Commands shows the menu and allows me to add a new menu item and macro.
After saving and exiting excel and going back into the spreadsheet, the new menu item is gone. How can I find the code to do this to keep the menu item? In the VBE, I looked in the object browser(F2) in all of the libraries and could not find the code. In the workbook_open and workbook_activate I can disable it with CommandBars("Worksheet Menu Bar").Controls("menu").Delete and it disappears.
View 14 Replies
View Related
Jan 19, 2013
I have a workbook with various pages that are all hidden except the main page, on the main page it allows users to select items froms drop down boxes that returns a figure to cell B7 on the selection page.
What i would like to do is press a command button and the hidden worksheet that relates to that figure in cell B7 opens which allows the users to print it then after printing or closing the workbook is hidden again.
View 4 Replies
View Related
Dec 12, 2012
I've got a User Form that works perfectly. It's activated on Chart Month sheet, you enter data into it and it switches to Comments sheet and copies the data, before returning back to the Chart Month sheet.
I have now added the same functionality to Chart Week sheet. Both Chart sheets use the same comments data, so it doesn't matter if you run the User Form from Chart Month or Chart Week. However, when I run the User Form from Chart Week then it switches to the Chart Month sheet once it copies the data, as I have Chart Month in the code. How do I get it to return to the sheet that it was originally on ie either Chart Week or Chart Month?
Code:
Private Sub CommandButton1_Click()
Dim emptyRow As Long
'Make Sheet30 Active
Sheets("Comments").Activate
'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("D:D")) + 1
[Code] .........
View 4 Replies
View Related
Nov 30, 2006
This is bizarre - over the last year or so, on two machines (one Win98SE/Off2K, the other Win2KSP4/Off2K3), very occasionally a change I've made to Excel/VBA code has been ignored (eg to add a MSGBOX call) - even after I've restarted Excel. The workaround is to add a blank line and remove it again in the actual code module, but its both annoying and intriguing,
View 4 Replies
View Related
Nov 6, 2008
My code runs so slow! The sheet only has 233 rows and 6 of them are not in the loop.
View 6 Replies
View Related
Oct 4, 2008
I need a message box with information before the code run. Yes - code run, No - exit code.
View 9 Replies
View Related
Sep 28, 2009
I have written some code intended to automatically clear a cell when data appears in it from an external source. In one spreadsheet, it seems to work exactly as expected, ie when the cell is polulated, it immediately clears the contents. In another spreadsheet, with exactly the same code, it will not automatically clear. If I put it in debug mode and step through it line by line, then it does do as expected but otherwise it won't.
View 9 Replies
View Related
Jun 29, 2007
I have used a code to find the character "-" and replace it with nothing ("") from several named worksheets across my workbook, which OzGrid helped me with before, and it worked fine. Now I've added the code into my module (at the bottom) it doesn't work. The rest of the code works fine, and it doesn't come up with any errors when I run it, but it just seems to ignore the 'find and replace' part of it.
Sub split1()
Dim fromSheet As Object
Set fromSheet = Worksheets(1)
Dim fromRow As Integer
Dim toRow As Integer
Dim lastRow As Integer
Dim errCount As Integer
Dim thisSectionName As String
Dim i As Integer ' loop counter
Dim rng As Range 'found range
Dim emptyCellAbove As Range
Dim rng1 As Range
Dim arng1 As String 'Address of 1st hit rng1
Dim ws(7) As String
Dim ii As Integer '2ND LOOP COUNTER
Dim iii As Integer '3rd Loop Counter
View 9 Replies
View Related
Apr 13, 2008
Consider two instances of Excel - one with a workbook containing a chart and some VBA code, the other containing a blank workbook. When I paste a chart from the first instance of Excel to the other, all the VBA code from the original workbook is also pasted into a new third hidden workbook in the second instance of Excel! If that weren't weird enough ON WINDOWS XP (but not Windows 2000) if the VBA code included WorkbookOpen or AutoOpen this code is executed in the second instance of Excel, which of course fails if it references sheets that only existed in the workbook open in the first instance of Excel! This is the first time I've seen the same version of Excel do different things on different versions of Windows! Example attached - What's going on!? Auto Merged Post Until 24 Hrs Passes;...note: this does not happen when pasting charts between workbooks open in the SAME instance of Excel
View 6 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
Jan 15, 2012
I'm trying to create a spreadsheet that uses one cell to enter a dollar amount and stores the amount entered in another cell. But I would like the input cell be zero after each entry, and the cell storing the amounts to keep a running total.
View 4 Replies
View Related
Apr 29, 2014
Attached is an example of the program. The purpose of this program is to allow someone with very little knowledge about the information to enter data. The first tab labeled "Instructions" is will have two macros assigned to the buttons at the bottom of the page. The first macro labeled "Move Data" will move data will clear data in the shaded cell on the "Entry Form" sheet and fill those cells in with '----. The second macro labeled "Generate and Save" will save a master copy of the program, save a historical copy of the program by date, and print/save a pdf copy of the "Reports" sheet.
Each one of the historical (the last 8 sheets of the program) sheet receives data from the "Entry Form" and then moves the data by date into the table for archiving purposes.
If you look at the code for the "Entry Form". I have a couple of subs. The first being Worksheet_change. the first section of this code is to force certain cells to be uppercase. This part of the code is working fine. The second part of the code is the Dim MyValues. This part is working fine also, but...
My issue is... When I run the move data macro from the "Instructions" sheet the Dim MyValues reads these as changes to the cells and wants to push the data to the historical sheets.
What I would like is an IF Statement above the Dim MyValues part of this code that stops the Dim MyValue part of the code running if those values are blank, 0, or have '---- entered into them.
Test.xlsm
View 3 Replies
View Related
Jun 27, 2014
I have the following code, I have it running to just work on Sheet 2 but I would like it to be able to run on mulitple sheets, not all but a range like from Sheet2:Sheet30.
[Code]........
View 12 Replies
View Related