SOLVED: thanks again IPGuru - you got me looking in the right place. I was changing the name but the .py which called the unzipper wasn't passing on a new name (if one was entered) from the downloader, just looking for the original from the url.
Thnaks for that IPGuru. To answer your question:
The code does successfully change the name of the .zip file as I am testing it using a short .py with a "destfilename" intentionally there for that purpose and the result is a file with "that_new_name.zip"
What happens is that it won't then unzip.
I scripted a download and unzip for .zip files. This works with no problem if the name of the .zip remains unchanged. If I try and change the name of the .zip on download then the zipfile.is_zipfile() won't recognise the file as a .zip file [though it still unzips in WinRAR].
I change the name...
Hi, I'm trying to use named arrays in Excel with the TREND function. I can do a SUM using named arrays to select data, such as {=SUM(IF((Array1="yes")*(Array2="Big"),Array3,""))}
Note: {} achieved by Ctrl+Shift+Enter after typing in the formula
I'm failing to do a TREND in the same way, such...
I can't seem to work out the code for launching Outlook from Excel. I want to assign a macro to a button which will open a mail message addressed to me. Excel doen't seem to recognise the commands. My attempt so far:
Dim olApp As Outlook.Application
Dim olMsg As Outlook.MailItem
Dim eglAdd As...
That is good sense Skip. I'm afraid my VBA/Excel knowledge is incredibly basic - I'm pretty much at my limit with what I achieved already! I'll go away and have a think on how to do that though, so thanks for the tip.
PHV - Success!
Both your suggestions work. Many thanks indeed.
Roel - I found PlotBy when I recorded a macro of making the chart. I run Excel 2003.
Interestingly, I pasted in your code and it produced a diagonal line across the chart! I'll try and get it to work when I have time.
Many thanks...
PHV, the contents of O2 is a number (1742 currently) that is the result of a count of the number of rows in the columns I'm interested in plotting (G:H) and is put there when a previous macro runs. (Hope that makes sense).
This doesn't work:
Dim LastRow As Long
LastRow =...
Thanks both. Still can't get it to work though!
Bob, to define it as an integer I just added:
Dim LastRow As Integer
Jens, your code doen't cause it to go to the debug and highlight the code in yellow (like mine does) but the chart remains blank.
I am using a work around by defining the...
Hi,
having defined a term "LastRow" for the value of the last row of data in a column, I tried the following which doesn't seem to work.
LastRow = Sheets("Grid_ML").Range("O2").Value
Sheets("Print_Sheet").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection.Add...
I have a piece of code which I grabbed from a recorded Macro and I want to substitute the Connection destination with the result of a GetOpenFilenam so people can chose files whenever they use the spreadsheet. I can't get it to work. What am I doing wrong?
Sheets("Grid_ML").Activate
GridDAT =...
Thanks PHV. With a bit of searching on how to use the function it looks like being the solution I was looking for.
http://msdn2.microsoft.com/en-us/library/aa195744(office.11).aspx
I am looking to make a macro to allow users of my spreadsheet to automate the import of a file which they create. Is it possible to make a dialog box so that they browse-to and select a file and then I can use this selection in a QueryTables.Add context to import it? Alternative suggestions...
Bong - thanks, that is neater that anything I had.
Skip, here is the code:
'Count Cells above CC
'method: set i as the value entered for the closing contour
i = Worksheets("Main").Range("D33")
'method: set activecell for starting loop as top of depth in MLGrid
a = 2
Sheets("ML_Grid").Select...
Sorry.
I have a spreadsheet in which people will paste three columns of data.
I'm writing a macro to sort this data by the third column C (Depth - which I've managed). It then has to work out how many of the entries in column C come above a depth figgure entered on a seperate sheet (Main).
From...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.