I am not a VB programmer. But have to create a macro in excel sheet which uses VB code. Actually on closing of Excel sheet i have a message box which asks to save the file. In that i am not able to make VB code to save the file to particular location. Can anybody provide me VB code so that i can save excel file to desired or predefined location. I have tried some codes from net but they are not working. Please help me out as whole module on which i am being working from one week is stuck because of this. Thanks in advance.
manni_n
Posts
-
How to save file to particular location in VB -
combobox eventthanks for your answer buddy but you didnt get that problem exactly .. i don't want selected item. it can be easily obtained from selecteditem. i want an event whenever item gets selected its respective database value gets filled in textbox. anyways i have solved the problem ComboBox1_SelectionChangeCommitted event can serve the purpose by putting query in this event. and binding the surname value in textbox
-
combobox eventi have a combobox and a textbox names are there in combobox list i want if i have selected any name from combobox respective surname should come down in textbox from database instantaneously leave database connectivity that i'll take care... i want front hand method....
-
How to close a form when move one to another formwell if your login form is startup form, and you are using VS2005 then just use closing_button_click()
me.close()
if using VS2003 then hide the form byme.hide()
for closing the complete application , you can useapplication.exit()
-
increasing size of partitioni want to increase the size of my system drive partition. is there any way to increasing the size by taking space from any other drive..?? please tell me the safest way.. i am not in position to format... tanks
-
adding .cpp file in vb.net -
Deleting partition.My OS is windows XP sp2 my windows partiton was 15 gb . but i dnt know hw a 8 GB unknown partion is made out of 15 gb... now my windows in instaled in 7gb partition which ultimately giving low disk space.... i want to merge that 8 GB unknown partion .. wen i delete that partition i am gettin this error.... "disk configuration operation did not complete.check the System Event Log for more information on this error. Verify the status of your storage device before retrying. If that doesnot solve the problem,close the disk managemant console, then restart disk management or restart the computer." can anybody help me in merging this partition...?? thanks
-
sharing values at runtime...thanks dave, now it makes sense to me. as forms are classes so encapsulation concept will be voilated... i'll try this way and come back to you.. thanks..
-
MDI form...form1 is mdiparent with ismdicontainer as true coding for form1
button_click event dim frm2 as new form2 frm2.show()
now in button click event in form2dim frm3 as form3 frm3.mdiparent=me.mdiparent frm3.show()
this was your method.. the method which i am using is in form2 i codebutton_click() dim frm3 as new form3 frm3.mdiparent= form1 frm3.show()
this one works but only when form1 is startup form. if form1 is any intermediate form and startup form is any other form then this method doesnt works.. any solution..?? thanks -
sharing values at runtime...i have a very basic problem and i dont know the reason for that.. suppose you have 3 forms if in form2 u code : form1.textbox1.text=textbox1.text it works as at runtime value of textbox of form2 transfers into textbox of form1.. even in form 3 u code form1.textbox1.text=textbox1.text it works.. but if in form3 u code form2.textbox1.text=textbox1.text it doesnt works.. can anybody tell the reason.. and alternate method of doing the same.. thanks ...
-
MDI form...i am using VS 2005. when i am writin this code in button click event of form2, form 3 gets open but not as a child of form1.. it opens as individual form...
-
forms loading [modified]christian is correct this is the first step in developing windows application.. lots of tutorials are available on net which starts from scratch.. better read them first. nyways for this particaular problem of yours, here is the code.. in button click event of form1 code like this..
button1_click() dim a as new form2 'makes the instance for form2 a.show() ' shows the form2 on clicking of button1 me.close ' for closing of form1(optional)
-
MDI form...its not working man... form3 is not becoming child of form1..
-
MDI form...example: suppose i have 3 forms and sequence of opening is form1->form2->form3 form1 is MDi parent, form3 is MDi child on clickin of form1, form2 gets open which takes some values from user retreives the data and accordingly opens form 3.. ma doubt is from form1, form2 can b made mdi child but from form 2, how form3 will b made child of form1..??? thanks
-
Running windows application in LANif i am gettin it correctly then you want to fetch your database to all the lan connected system where ever you have installed your executable file well this is server client application... if this is the case, then i know the procedure for sql and excess , i hope same logic should work. In the connection string where you are giving path of your database in coding, jst add the ip adress of server like "//ipaddress of server computer/path of database". and from server computer you have to share the database file. try this out, may it helps you....
-
updating values at runtime...i have a simple doubt but i dont know how to do it.. actually i have displayed a database table in datagrid.... now i want to add or delete some values of data grid for dat i have given an edit button which opens a new form wid column name in labels and their values to be enterd in textboxes.... i want wen i click update button values get update with original datagrid window still opened.. database coding is not the deal.. important part is how can i update values of one form while focus on other form... thanks in advance....
-
window deploymentwell if you have studio installed then framework must be there automatically this problem generally comes when you install your package on any other system which doesnt have framework installed. coz dot net application needs framework to run. please specify your problem more clearly.
-
RE: I could use some help hereits simple...
button1_click() Dim a As New Form2 a.YourPublicMember = TextBox1.Text myform.Show()
before loading of form 2 public yourpublicmember as string form2_loads() textbox1.text=yourpublicmember -
Runtime control creation.....obviously u must be knowing dave... this is code is not for you. yeah by mistake i replied your post...
-
Runtime control creation.....Adding an control at runtime The following routine adds the Email label and associated text box at run time. Private Sub AddEmailAddress() Dim txtEmail As New TextBox Dim lblEmail As New Label ' Set the desired properties txtEmail.Top = txtAddress.Top + txtAddress.Height + 10 txtEmail.Left = txtAddress.Left lblEmail.Text = "Email" lblEmail.Location = New Point(lblAddress.Location.X, _ txtEmail.Location.Y) ' Add to the collection txtAddress.Controls.Add(txtEmail) txtAddress.Controls.Add(lblEmail) End Sub The above is adopted from MSDN. When you are creating controls at runtime you need to add event handlers in runtime also.. Read the following topic.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv\_vstechart/html/controlarrays.asp