I have locked cells in a spreadsheet using this lines of code.
Range("A1:D23").Select
Selection.Locked = True
ActiveSheet.Protect Contents:=True
This prompts me whenever I click on a cell which is readonly to unprotect sheet from review tab and might be prompted for password.
My problem is, it is not prompting for password.How do I f...
I'm unprotecting my sheet by entering password.When I click on OK apart from Worksheet protection changing I want to write soem other code.How do I do this
...
Hello,
I'm using a macro, which inserts a text into the footer. After the macro has finished, the Header & Footer Tools are active, so I'm in the editing mode for the footer. Does anyone know how to close this editmode with VBA?
Thanks
...
I'm attempting to copy data from three workbooks (one at a time) from the same range (A4:A8) and paste them into a new workbook. The only catch is I'm trying to make the paste part move down by 10 lines each loop.
I'm receiving an error message on the PasteSpecial line. I'm not sure why?
(I'm an Excel macro novice, but I'm giving it a ...
Hello guys, I have a python code that reads 3 arguments (scalars) and a text files and then returns me a vector of double. I want to write a macro in vba to call this python code and write the results in one of the same excel sheet. I wanted to know what was the easiest way to do it, here are some stuffs that I found:
- call the shell() ...
I have an Excel workbook containing some ComboBox controls placed directly on the sheets. These are standard combo boxes from the Forms toolbar.
When the user uses "Save As" to save the workbook with a different name, this triggers the Change event on all the combo boxes, including ones on sheets that aren't active. This seems unreasona...
I'll give an example with a SmartArt Shape, but it could be asked about other shapes too.
When I go over Slide.Shapes, one of the Shapes has:
Shape.Type=msoPlaceholder and Shape.PlaceholderFormat.ContainedType=msoSmartArt
Is there a way to get to the actual SmartArt Shape contained in the placeholder?
Thanks,
Arie
...
Hi all,
I have a dropdown list where it gets the data from a table called table1 in the SQL Server 2005. There is a button next to the drop downlist to add new data to table1. when I click the button and successfully add the new record to table1, I don't see this new added record in my dropdownlist. I have to close the excel sheet and re...
I have an Access database project that is getting a bit to large to try to keep track of in my head. I know it is a little late in the game, but better late than never right?
I have Googled but found nothing to my satisfaction. Is there any such thing as a unit testing framework for MS VBA?
...
I have a range of readonly cells.After that all other cells are editable.I want to know how can I detect this cell editing event.Like if cell A25 is edited,I want to call a procedure.
If Cell(A25).edited then do this.Some thing like this
...
CSV file:
#3GMACRO,,,,,,,,,,,,,,
,,,,,,,,,,,,,,
IMSI,IMEI,Date,Time,UMTS MACRO-UARFCNDL,UMTS MACRO-PrimaryScramblingCode,UMTS MACRO-CPICHTxPower,UMTS MACRO-PLMNCellId,UMTS MACRO- RNCId,UMTS MACRO-MCC,UMTS MACRO-MNC,UMTS MACRO - LAC,UMTS MACRO - RAC,UMTS MACRO - MaxUETxPower,UMTS MACRO - MeasuredRSCP
2.6275E+14,3.57539E+14,20100107,16000...
Dim collet As String
collet = ThisWorkbook.ColLetter(ColCount) + ":" + LTrim(Str(Target.Row))
Set my_r = Target(collet).Select
I'm getting the runtime error at the last line in my code.Cannot figure out why
...
In my MS Access application I need to send a batch of info to my webserver on a regular basis. I don't need anything fancy like SOAP, XML-RPC or anything, just a simple POST page request is sufficient. I've Googled a bit but have been unable to turn up anything really helpful.
Does anyone know of a resource or have a code sample to perf...
We are trying to improve the administrative UI to an application we have that uses Excel as a portal to a proprietary DB. All the APIs are written in VBA thus every thing is done in Excel. Rewriting the APIs does not appear to be an option at this time.
Is there anything we an do to use those APIs in the .net environment?
...
I want to display a "Please Wait" form while a 60+ second query is running. I have the query and the form made (easy enough), except the macro won't bring them together. Here is my autoexec macro:
SetWarnings=False
Open Wait Form
Run the query & Display Results
Close Wait Form
The problem is that I can only see the outline of my wa...
Hi ,
My code is as below
conDB.Execute strSQL, recordsAffected
Sheet1.Cells(intStart, 5) = IIf(recordsAffected > 0, "Success", "Failure")
Intread of printing failure i want to print the error description. I tried
Sheet1.Cells(intStart, 5) = IIf(recordsAffected > 0, "Success", Err.Des)
but it doesn't work. Any ideas?
...
i have an old string say oldString="abc-2" i want to change it to "abc-3"
so i did this
myArray = Split(oldString, "-")
oldP = myArray(UBound(myArray))
myArray(UBound(myArray))= Str(val(oldP) + 1)
newString=join(myArray,"-")
why do I get the wrong number??
and if i try to use Cint(), then i got Error.
please help...
just found the r...
Hi,
I am experiencing a funny behaviour of Textboxes on a VBA Userform: On pressing Alt-Gr the box loses focus. This happens after running a bit of VBA initialization code for the form. The text box has neither initialization code nor event listeners. Starting the user form straight out of the IDE everything is fine.
I suspect a MS Off...
This is Excel 2003.
I'd like to know how long it takes an external query to complete and then update a cell in my spreadsheet with that ET. I have the following, but it doesn't work because the ET is only as long as it takes to initiate the refresh:
Sub Refresh()
Dim StartTime, EndTime, ET
StartTime = Timer
ActiveWorkbook....
I am trying to figure out how to use ADO and ADODB to get data and view it while also being able to determine the PK so that I can alter data.
My plan is to use ADODB to display some data to an end user in Excel, if the user wants to edit the data there will be a macro monitoring cell changes and then sending the change to the database....