Posts by Malhar

    I am using a VBA macro to populate the pages of a flashcard website.

    In one of the text fields, I need to enter a URL. When I do this task manually, as soon as paste the URL into the field and press the Enter button, the URL turns into a hyperlink. So when I review the flashcard later, I can click on the URL and open the relevant web page in another tab.

    However, when I use the following code to populate that field, the URL doesn't become a hyperlink, but remains text. Is there way I can ensure that the URL becomes a hyperlink?

    Thanks


    Code
    1. htmlDoc.getElementById("Front").innertext = String1
    2. htmlDoc.getElementById("Back").innertext = "https://www.history.com/topics/china/genghis-khan"
    3. htmlDoc.getElementById("GoNextcard").Click

    Hi,


    Problem : Solver keeps giving me this message- Do you want to replace the contents of the destination cells?. And therefore, my routine is not fully automatic.[COLOR="Blue"] Note that I have set Application.DisplayAlerts = False.[/COLOR]


    What confuses me more is that I recycled this code from an old project. The only things I changed were the cell addresses. And, the old project still works fine ( i.e doesn’t give me the message). Can you please suggest a remedy? Thanks.


    Please see the code below.


    Hi All,


    I am trying to plot two data series in one chart. The first series has monthly corn prices for last 10 years ( ~130 data points). The second series has bimonthly chicken prices over the last 10 years ( ~72 points). How can I plot them together?


    The bi-monthly periods for the second series do not exactly coincide with calender months ( e.g. Aug 19 to Oct 13 , 2007). As a result, I can not adjust the points to match with calender months.


    Please feel free to give your suggestions.


    Thanks,


    MG.

    Hi All,


    I am trying to copy a long table ( about 25 columns) from Excel to Word document using the regular Paste command (Control +V ). When I do that, Word is creating another 1 X 1 table in each cell in a particular column. I don't know why it is happening. Could you provide me any help?


    Thanks,


    MG.

    Hi All,


    I am trying to open a pdf file using VBA so that I can print it. However I am not able to open the file itself ( the code is given below) . I am getting 'Error 429', ActiveX component can't create object. Can you please help?
    I know that I can use ThisWorkbook.FollowHyperlink method to open a pdf file, but then I don't know how to print a few pages in that file automatically



    Thanks,


    MG.

    Re: Print Multiple PDF Files


    Quote

    Sure, see all the Answers above.


    I had checked those answers before I posted the question. I did not find any of them useful.


    Thanks,


    MG.

    Hi All,


    I have around 100 pdf files. I need to print specific pages from those files (e.g. 5 to 10).
    I want to build a macro to do this task automatically. Could you please provide me some sources.


    Thanks,


    MG.

    Re: Copy Picture - System Resources Error


    Quote

    If you look at the clipboard (Edit > Office Clipboard), it is probably accumulating pictures. Hmmm. After each Paste, try this


    Now I am getting an error 'Margins do not fit page size'.

    Re: Copy Picture - System Resources Error


    Thanks. Here is a part of my code.


    Hi All,


    I am trying to copy 8 adjacent cells in a sheet and paste them on another sheet as a picture
    (using copy picture method). I could do that 3/4 times, but after that I started getting the insufficient system resources error. How can I get around this problem?


    Thanks,


    MG.

    Re: Looping Through Worksheets


    Wigi,


    Thanks. It worked. But I still don't know what the problem was.


    If I don't understand the reason, I will keep doing that kind of errors.
    Could you point me to a resource that explains the problem?


    MG.

    Hi All,


    I am facing a strange problem. I am trying to set a standard font and font size for all the worksheets in a workbook. I tried the following code and it would set the font and size for only one worksheet. What could be the problem?
    Thanks.


    MG.


    Re: Replace Missing Data


    Hi Guys,


    Thanks for your help.
    I completed my task by importing CSV files. The process of importing excel files, was giving me virtual memory error. Also CSV process is much faster.


    I am including my code here in case somebody face a similar problem.


    -MG.


    Re: Replace Missing Data


    Mavyak,


    Thanks. I would do that.


    I am getting an error message when Fundname variable containts O'Shaughnessy. I think the apostrophe is messing up the SQL statment.


    What is the solution on that?



    MG.

    Re: Replace Missing Data


    Hi Mavyak,


    Thanks. I tried to use your suggestion but I am getting a lot of erros. I am not that good in ACCESS VBA. Can you please take a look at the following code.


    I am trying to use the data in a latest excel file to fill the missing values in the access database.



    Thanks,


    MG

    Hi All,


    I need some help with inserting data in a newly created field in old records.


    I have a large table, which stores monthly sales data of approx 1000 companies over a 10 year period. The table is in LONG format with only 4 fields - Date, Company, Comp_Category, Sales.


    Each month I get data for those companies, in the same format, and I just need to append that data to the main database.


    The problem is that, Comp_Category field was introduced recently, two months back. Therefore, I have added an extra field to our main database. But I don't know how to insert the Comp_category info in the previous records (~150,000) in an efficient way.


    Thanks,


    MG.

    Re: Macro To Convert All Worksheets To Csv Files


    Quote

    That workbook has only 1 sheet which I was easily able to import to Access like this.


    Norie, thanks.


    Due to the limit on the size of file that can be uploaded on this forum, I just kept one worksheet. In the actual file there are 12 worksheets.