Save File With Hidden Property
Jun 9, 2007
I have an excel file which is in windows explorer has its property set to hidden.
I have another excel file, with some Vba in it, which opens the hidden file, inserts some data into it, saves the file and closes it.
ActiveWorkbook.Save
ActiveWorkbook.Close
This all works, except that the hidden property is lost in the process.
Is there a way of saving the file, and keeping the hidden property? This is just so that users cant see the file and accidently open it.
View 3 Replies
ADVERTISEMENT
Jun 5, 2006
I'm trying to display some result in my sheet and I don't go further of the MsgBOx use. see my vba code
Dim xslt As New MSXML2.XSLTemplate40
Dim xslDoc As New MSXML2.FreeThreadedDOMDocument40
Dim xmlDoc As New MSXML2.DOMDocument40
Dim xslProc As IXSLProcessor
Dim paramxml As MSXML2.DOMDocument40
xslDoc.async = False
xslDoc.Load "c:compara.xsl"
If (xslDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xslDoc.parseError
MsgBox ("Ha um erro " & myErr.reason)
Else
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.Load "C:Instructional_program.xml".................
View 2 Replies
View Related
Mar 20, 2009
When I am saving my spreadsheet as a text file, I have 1 column with formulas that I would like to not show up in my text file. I have tried hiding the column, and have Googled for awhile now.
View 2 Replies
View Related
Mar 19, 2014
I locked the cells on Sheet1 from B4 to B10.
I protect the Sheet1 Review > protect sheet and selected two checkboxes from protect sheet property "Select locked Cell" and "Select unlocked cells".
It is working fine and it does not allow the user to view the locked cells B17:B24 while protection is on.
I have a RadioButton1 on the same Sheet1 and i put the following code behind the button to hide the 4 up to 10 rows. When i will press the button while password protection is on; it is giving me the following error:
Unable to set the Hidden property of the Range class.
View 7 Replies
View Related
Jul 30, 2013
Here is my code:
Code:
Private Sub ComboBox1_Change()
ActiveSheet.Rows("3:62").Hidden = False
Range("D1").Value = ComboBox1.Text
End Sub
I get a runtime error '1004' when I make my combo box selection. I don't have any security or password protection type stuff. The combo box is part of a more complicated spreadsheet and I don't want to switch to a data validation type drop down and I really want it to be activeX.
View 4 Replies
View Related
Oct 31, 2006
I have recently tried to implement the password protect from viewing code from this site. It worked brilliant on a basic spreadsheet, but when I tried to implement it on a worksheet with links I keep getting the error:
Run-time error '1004'
Unable to set the hidden property of the Range class
View 9 Replies
View Related
May 3, 2012
This first macro works fine:
Sub UnhideHBPorCholesterolQ1toQ3()
'
ActiveSheet.Unprotect "password"
Rows("58:67").Select
[Code]....
why the second macro does not seem to work. I get a Run-time error that says "Unable to set the Hidden property of the Range Class".
View 1 Replies
View Related
Jun 25, 2013
I am using this code (below) to hide certain rows or columns depending on what number is entered. Everything is working fine and I am at the point where I would like to share this excel sheet with others but I would like to lock certain cells so that others cannot alter the formulas. As soon as I lock the cells and then enter values into the unlocked cells, I get the "run-time error '1004': Unable to set the Hidden property of the Range class".
I am using excel 2010 x64.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)If Not Intersect(Target, Range("B3")) Is Nothing Then
If Range("B3").Value = 0 Then
Columns("G:P").EntireColumn.Hidden = True
Else
If Range("B3").Value = 1 Then
Columns("H:P").EntireColumn.Hidden = True
[code]....
View 3 Replies
View Related
Jun 30, 2014
Imagine I have a form with a few controls on it. And the controls properties are set up at runtime.
Is there any way possible to save the property changes that were made at runtime to the controls themselves? I mean - short of manually editing all the controls at Design time?
This might be easier to explain by example. See dummy code below. Using this example - I want to find something that will save the Caption of CommandButton1 as "TestMe" (rather than have it only temporarily set at runtime).
View 2 Replies
View Related
Oct 30, 2009
I'm trying to unhide all the cells in a worksheet, but keep getting the "Unable to set the Hidden property of the Range class" error and I'm not sure what to do.
View 2 Replies
View Related
Jan 21, 2007
Is there a property that contains the name of an XML file a user has imported into Excel? If not is there any way I can retrieve the name of the file?
View 4 Replies
View Related
Oct 10, 2011
VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.
View 1 Replies
View Related
Apr 1, 2009
I have an Excel sheet with a long list of data. A short example is shown below:
Section | Title | Item
1 | INTRODUCTION | a
1.1 | title2 | b
1.2 | title3 | c
1.2.1 | title4 | d
1.2.2 | title5 | e
I made a VBA macro in Excel that runs through this list and creates a new Word file for each item. The filename of the document is based on the data in the Excel file (section and title). Now I would like to add a custom property to each of the newly created Word files, i.e. the value in the 'item' column. Does anyone of you know how I should do this? Or should it be better if I write a macro in Word that runs through the Excel data to create the word files? Here is the code I use to generate the word files:
View 2 Replies
View Related
Mar 11, 2014
am using Excel 2010 and having issues trying to save a worksheet to a specified file location with the save date....
I have tried several posts form this forum and elsewhere and can't seem to get the macro to do what I want.....
I want to save a 'worksheet' from an open workbook that I use for updating information to the same file path as the workbook with the date the file saved...
View 6 Replies
View Related
Aug 21, 2012
What I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.
All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.
View 2 Replies
View Related
Aug 15, 2013
Currently I'm using excel 2000. Can't hide hidden column when save as webpage?
View 2 Replies
View Related
Jan 17, 2010
I have a macro that copy one sheet of the Active workbook and sends it via email.
I need to add a code in this sheet so when one opens it from the email, with a command button to be able to save the file to specific, fixed folder on the local network with it’s original file name.
View 10 Replies
View Related
Jan 23, 2007
I am not sure why but when I opened a particular file, the file hides somewhere in Excel. I am unable to view the file but when I try to open the same file again, Excel prompts that the file is already open but I can't see the file.This is an important file at work and I am not sure how to actually get to view the file. I tried copy and pasting the file in another location and then trying to open in Excel. However, the same thing happened.There is no error message.The file is opened but I am unable to view, as it seems to hide from view.Is there a solution?
View 7 Replies
View Related
Jun 15, 2009
Can you get Excel to open another Excel file linked to the first automatically (preferably hidden and read only) in the background ?
View 3 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
Jul 6, 2012
I am trying to open a website, then for excel to download the csv file, then for it to save it in a specific folder under a specific name and file format (excel).
I am successful at opening the website with the following code, but how to do the rest.
Sub Searchez()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://quote.morningstar.ca/Quicktakes/stock/keyratios.aspx?t=clwr®ion=USA&culture=en-CA&ops=clear" 'load web page google.com
IE.Visible = True
While IE.Busy
DoEvents
Wend
'IE.Navigate2 "javascript:SRT_keystuts.exportcsv()"
'this is the name of the download link as from when i hover my pointer over download link.
End Sub
View 1 Replies
View Related
Jun 4, 2009
I'm working on the following
Workbooks.Open Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-" & Ucase(Format(DateAdd("y", 0, Date)), "YYYY-MM-DD")&".XLS"
ChDir "D:CommondataIBMmain"
ActiveWorkbook.SaveAs Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-NAFTA.XLS", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close
Date: 2009-06-03
What I'm trying too do is open a file, make an exact copy and save it under a new file name.
My problem is in the date formula the day is not always the same. In the sample case it's 03 at other times the day will change.
is there a way too get this too work irregardles of what the day might be?
View 9 Replies
View Related
Apr 9, 2014
I have a spreadsheet where I want to require certain fields to be completed then I want to have that file auto emailed. I have learned that I do need to have the file saved before sending otherwise the data will not appear in the email, so with this I want to have the file temporarily saved emailed then the temp file deleted.
Here is the code I have so far but it errors on the blue text, I did change the TempFileName from = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss") to = [C16] & "_" & [B6] & "_" & [D6]
Private Sub CommandButton1_Click()
If Range("B6").Value = "" Or _
Range("d6").Value = "" Or _
Range("f6").Value = "" Or _
Range("E9").Value = "" Or _
[Code] ......
View 1 Replies
View Related
Jan 27, 2014
A co-worker of mine is exporting files from Quickpen as excel files, but every time he names the files with any Uppercase letters in the files name, they are automatically changing to all lower case. Even when he tries to rename the files, they will not stay with any uppercase letters....I have searched all over and cannot find a solution. If he sends ME the file, I can open it in excel and save it with any cases.
View 2 Replies
View Related
Jul 10, 2014
I have a Workbook that already has a macro in it that will generate multiple sheets based on certain criteria.
For each of these newly generated sheets (numbered 1-6 in the attached example), I need to be able save each of them to a PDF file based on a unique name contained in a certain cell (in this case, each named is referenced in cell Q1 of each sheet). As such, I should end up with 6 pdfs based on the attached sample files.
The PDFs would ideally need to be landscaped and should be just 1 page per sheet.
In my attached sample workbook, you'll notice that I have a "PracticePrint" macro that doesn't quite get the job done. One other criteria involves not printing any sheet with the characters "1010" in it (my PracticePrint macro is setup to do that, but it fails to do much else).
View 1 Replies
View Related
Mar 14, 2014
I have a macro which successully saves a worksheet as new file to another file path....(below)...but I can't figure out how to close this new file and return to the original file...
Dim myPath As String, fName As String
myPath = Sheets("Date").Range("C8").Text
fName = Sheets("Date").Range("C9").Text
Sheets("Sage CSV File").Copy
With ActiveWorkbook
.SaveAs Filename:=myPath & fName
End With'
View 2 Replies
View Related
May 24, 2006
Need Macro where I can import a text file saved on my computer into a new sheet named yesterdays or todays date in format "ddmmyy" and then the sheet gets hidden.
View 9 Replies
View Related
Oct 10, 2011
I have written the following simple macro to import some data into a worksheet and then prompt the user to save the file in Excel 2003 format (the system to which we will upload this data does not accept formats later than 2003). The template is in "*.xlsm" format.
The code executes without error, but when the user hits the "Save" button in the "Save As" dialog box, nothing happens. The "Save As" box closes, but no file is saved.
Code:
Private Sub cmdImportData_Click()
Dim sFName As String
'On Error Resume Next
PrepData
CopyData
FormatColumns
'prompt the user to save the file in "*.xls" format
sFName = Application.GetSaveAsFilename("upload", "Excel files (*.xls), *.xls")
End Sub
View 3 Replies
View Related
Oct 19, 2005
How can I set the SAVE AS file name to equal A1's cell contents? (More specifically, when I need to rename an existing open file and place my cursor in A1 and hit Save As, I need to new file name to automatically populate A1's cell contents so I don't have to retype the contents of A1.)
View 1 Replies
View Related
Mar 12, 2014
How can I save worksheet from existing workbook as a new workbook with extension .xls or .xlsx depending on the version of Excel on which the original was opened and no matter the extension of original?
My code that I was trying to create all above does not work, because even if I am using Excel 2007, 2010 or 2013 it will still be saving only as .xls.
View 2 Replies
View Related