Hey mate! Thanks for that. An amazing article and very user friendly. But now I am stuck on the part where I need to call the function to make the color change. I tried to copy the code from the macro but that keeps giving me weird errors like MissingMemberException: Public member 'Selection' on Type 'RibbonButton' not found etc Any reference on this would be great. I am googling myself as well but would like to thank in advance. regards.
Ali Rashid
Posts
-
VB Script Help For Microsoft Excel -
VB Script Help For Microsoft ExcelOr tied to a home made rocket and shot to the space... lol
-
VB Script Help For Microsoft ExcelHi Guys! I am in a bit of a Dilemma here again. As much as office 2007 has provided more options in Excel, it has made it darn difficult to do things which were so easy until Office 2003. The problem is, I want to create macros which change the background color of the selected cells according to the company colors. There are 6 different colors which need to be applied. I did the record macro option which works fine and places icons next to the save button on the top left corner in Excel 2007. But my boss wants something different, he want a seperate ribbon with the different color options and also that it should be an add-in otherwise it would be hard to implement all these macros on more than 600 computers world-wide. Can anyone please help me out with this one. I have no experience with VB.Net or Microsoft Office programming. I am a web developer but this is something that has been haunting me for a few days now. To wrap it up, I need to make an Add-In for Microsoft Office 2007 which sits in its own ribbon and has 6 different options. All these options change the background colors respectively, of the selected cells in Excel and needs to be easy to implement by the staff world-wide, we can just provide them with the add-on to run on their computers. Also, this would need to cater for the existing files as well which takes the template files out of the question unless there is a way to make the template file as the default sheet that opens up the existing data. Any help, suggestions, examples or references will be highly appreciated. Thanks.
-
Dynamically Add Rows to html table from code behind [modified]Thanks for the reply mate! I'll give it a try and see how it goes though I am sure that it might not be a good idea saving the table in the session as this is a high traffic site and people can have more than 10 rows in their table. So the table times the number of users may make the site perform slow. Nonetheless, I will carry out an SVT and see how it goes. Regards.
-
C# message has messed up the formatting of whole forum.Hi There! Well this is what I did, I pasted my code which includes HTML and the server side code. Apparantly I did not select the Encode point brackets (and other HTML) characters when pasting check box which pasted the html as is and that somehow crashed the forum. I did an edit and recopied the html code with the embed html tags embed checked and that seems to have fixed the issue. Please refer to the following URL to see the thread and the suggestions from other forum members. http://www.codeproject.com/Messages/3406896/Re-Dynamically-Add-Rows-to-html-table-from-code-be.aspx Thanks.
-
Dynamically Add Rows to html table from code behind [modified]Hi Dave! Please let me know if this edit solved the problem, else I can delete the post. Sorry for any inconvenience caused Regards, Ali
-
Dynamically Add Rows to html table from code behind [modified]Hi Guys! I am in a bit of a Dilemma here and need some help. I have a table that has a row and three columns which are showed to the user after the page loads. There is a button which calls a code behind function to add a new row. The first time the user clicks, the row is added properly, no problem. The second time however, the row is not added but the previous row that was added is updated with the new id/name etc. Also the second time, the drop down menu gives an error which is quiet ridiculous, something to do with accessing innerHtml of the drop down menu when I am not even asking the compiler to assign anything of that sort. Please have a look and let me know where the problem is which my brain cells are failing to recognise. Note: I have tried all the different methods to add the row for example table.Rows.Insert(index,htmlRow) etc. Thanks is Advance. Below id my code for reference: ============================= Front End [HTML - Table only] ============================= <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table cellpadding="3" cellspacing="3" runat="server"> <tr> <td style="font-family:Courier New; font-size:12pt;"><b>Loan Type</b></td> <td style="font-family:Courier New; font-size:12pt;"><b>Amount Owing</b></td> <td style="font-family:Courier New; font-size:12pt;"><b>Monthly Repayments</b></td> </tr> </table> <table cellpadding="3" cellspacing="3" id="tblLoanTypes" runat="server"> <tr> <td width="33%"> <select name="loanType1" id="loanType1" class="txtNormalDrp" runat="server"> <option value="" selected="selected">Please Select</option> <option value="Home Loan">Home Loan</option> <option value="Investment Loan">Investment Loan</option> <option value="Credit Card">Credit Card</option> <option value="Personal Loan">Personal Loan</option> <option value="Store Cards">Store Cards</option> <option value="Tax Debt">Tax Debt</option> <option value="Other">Other</option> </select> </td> <td width="33%"><input type="text" class="txtBalrepayments" name="balance1" id="balance1" onfocusout="fcnAddTotals();" onkeypress="return numbersonly(event, false)" /></td>
-
Guys pls suggest me a good project definition using .NETtry creating a generic web sie builder using xml as settings/configuration file. this will expose you to a lot of .net concepts. if you need any help, feel free to ask regards, Ali
-
RAM usageYou cannot explicitly set the amount of RAM that the system should use (as far as my little knowledge serves me). You can however, set the priority of the SQL Server to low as compared to other applications (Press ALT+CTRL+DEL > Click task Manager > Applications (TAB) > Select Image Name sqlmangr.exe > Right click on it and select option: set priority). That would mean that you would have more processing preference for other applications. But remember, with the size of the databases you are talking about, you would still have issues with the processor getting hit hard. If you cannot redice the DB size, then increase the RAM, much better get dual processors and set one processor to solely work on SQL Server. This is what a Hardware guy can set for you. Regards.
-
Connection LifeTimeSimply, connection timeouts refer to the time it takes the Server to run a query and generate a result. If you reach connection timeout, your conenction to the database will be terminated and you will need to re-initialise the connection to the database. When we talk about Pooling, what that refers to is that when you try and make a connection to the database, the server tries to make contact with the database engine. If you set the timeout value to 5, it will try for 5 seconds and if no connection has been established, it will return you an error (Connection Timeout). Which means that you didnt have a connection to begin with. If you do establish a connection and then leave the connection (Close()), you will again lose the connection and you will need to go through the same process of establishing the connection. Hope that this helps. Regards, Ali
-
Work with query results inside a stored procedureDeclare a temp table and save the result set inside that table. Make sure to drop it before you exit the stored procedure.
-
how to fasten form loadHey Ahzar! First of all, the time it takes the page to load depends on the the server that you are calling the page from. So I hope that you have a good server machine doing the back end processing. Secondly, are you using a lot of If Then statements, if yes then that could be another reason? Third, I am not sure why you need 200 control (which I assume you are refering to HTML elements -> checkboxes) but see if you can break them down into sub pages, just like registering and filling out a form in thre steps. Remember that the Windows Mobiles are not as fast as a normal desktop system. These are just the general hints that I can give you. It would make more sense if I knew exactly what is it that you are doing etc etc. Feel free to email me if you need more help. Regards, Ali Rashid
-
converting char to datatimeHey there! It is a bit hard to convert it to dateTime from just 24hrs Time format. From the little knowledge you have, you could play around with the following syntax but I am sure that it won't return you the proper result. Syntax: convert(varchar(24),cast(1530 as datetime),8) It would be wise to just do it on the front end if you are using it. In C#, you can achieve this by: DateTime _dteDateTime = Convert.ToDateTime("1530").ToString("hh:mm"); If you are using VB.Net, I think the syntax was: FORMAT(Node, "yyyy-mm-dd") Hope that this helps. ------------------------------------------------------------------------ If there was no SQL, there would be no sequels to programming.
-
SQL QueryHey Blue Boy! :-D Thanks for the help mate. Yes the columns and the values that you are displaying are correct. But from the resultset, what I need is ID: 3 and value 11 as Min(itemPrice), and ID: 6 and value 13 as Max(itemPrice). What I need is the lowest unique or distinct (whatever you would like to call it) and the maximum value which does not have similar values (e.g 11 and 13 have only one entry where as others have more than one). The other query that I mentioned in the last post returns me the values 11 and 13 but it is not returning the ID's (3 and 6) respectively. I hope I make some sense now. Sorry if I failed to explain it properly earlier. Thanks and kind regards, Ali
-
SQL QueryHey Blue Boy, Sorry, wrote it the wrong way, it returns the id if I add it but it did not return the unique values I was looking for. The query given by Syed returns the values I want but it does not return the ID for the product. Thanks.
-
SQL QueryHey Blue Boy, Thanks for the reply. I did and it returns the min and max value properly. But I am not getting the ID for the item. Thanks for the help.
-
how to save only time in database fieldHey, Unfortunately you cannot save the dateTime column without date. However you can extract them using the convert function in SQl Server. e.g: select convert(varchar,DateColumn,108) from MyDateTest99 The following table gives you the details of which digit sequence to use: 0 or 100 mon dd yyyy hh:miAM (or PM) 101 mm/dd/yy 102 yy.mm.dd 103 dd/mm/yy 104 dd.mm.yy 105 dd-mm-yy 106 dd mon yy 107 Mon dd, yy 108 hh:mm:ss 9 or 109 mon dd yyyy hh:mi:ss:mmmAM (or PM) 110 mm-dd-yy 111 yy/mm/dd 112 yymmdd 13 or 113 dd mon yyyy hh:mm:ss:mmm(24h) 114 hh:mi:ss:mmm(24h) 20 or 120 yyyy-mm-dd hh:mi:ss(24h) 21 or 121 yyyy-mm-dd hh:mi:ss.mmm(24h) 126 yyyy-mm-dd Thh:mm:ss.mmm(no spaces) 130 dd mon yyyy hh:mi:ss:mmmAM 131 dd/mm/yy hh:mi:ss:mmmAM Hope that this helps... Regards, Ali
-
SQL QueryHi Guys! I am using the following Statements: Select min(ItemPrice) as MinUniquePrice, max(ItemPrice) as MaxUniquePrice From ( select ItemPrice, Count(*) as ItemPriceCount from #Mytable group by ItemPrice Having Count(*) = 1) as MyTableWithUniqueItemPrices which returns me the unique value in the table. The only problem is, how do I also get the itemID without the SQL Server listing all the values in the Table. My Original Question is pasted below for reference. Thanks once again to all the guys who had helped me earlier. Ali. ----------------------------------------------------------------------------------------------- ORIGINAL QUESTION: ================= I tried to look around but I could not find an answer for this question. I need to run an SQl Query which retuns me the highest Unique Value and the lowest Unique value from the same column. For example. Lets say the column name is itemPrice, and has the following values: 10, 10, 11, 12, 12, 13, 14, 14 respectively. How can I get the 11 and 13 as the result of my query. I have tried DISTINCT, MIN, MAX and HAVING but to no avail. I am using SQL Server 2000.
-
SQL ServerThanks Guys! That was really helpfull. Regards.
-
how to solve this erro plzCan you give more details on the error. Also which operating system you are using and which version of Oracle etc. Thanks